Commit ddcc145
committed
fix: use nbsp separator for fzf-lua entries (not tab)
fzf-lua uses nbsp (U+2002 EN SPACE) as the standard separator between
display text and file path info, not tab. The builtin previewer parses
entries by splitting on utils.nbsp and extracting the path:line:col:
portion.
From fzf-lua/path.lua entry_to_file():
local parts = utils.strsplit(entry, utils.nbsp)
for i = 1, #parts - 1 do
if s:match(".-:%d+:") then break end
idx0 = idx0 + #s + #utils.nbsp
end
return entry:sub(idx0), idx0
Changes:
- Use nbsp (\xe2\x80\x82) instead of \t as separator
- Update fn_fzf_index to split by nbsp
- Use file_path (relative) before file (absolute) for correct resolution
This fixes 'Unable to stat file' errors in preview.1 parent e02416b commit ddcc145
1 file changed
+8
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
217 | 219 | | |
218 | 220 | | |
219 | 221 | | |
| |||
232 | 234 | | |
233 | 235 | | |
234 | 236 | | |
235 | | - | |
| 237 | + | |
236 | 238 | | |
237 | 239 | | |
238 | 240 | | |
| |||
246 | 248 | | |
247 | 249 | | |
248 | 250 | | |
249 | | - | |
250 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
251 | 255 | | |
252 | 256 | | |
253 | 257 | | |
| |||
0 commit comments