Skip to content

Commit 050fc88

Browse files
committed
fix(previewer): don't set hl on invalid col
regression of 7162adf `:FzfLua buffers` can notice the difference
1 parent b9f947a commit 050fc88

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lua/fzf-lua/previewer/builtin.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1329,7 +1329,7 @@ function Previewer.buffer_or_file:set_cursor_hl(entry)
13291329
end
13301330

13311331
-- Fallback to cursor hl, only if column exists
1332-
if not extmark and hls.cursor and entry.col then
1332+
if not extmark and hls.cursor and entry.col > 0 then
13331333
local end_lnum, end_col = entry.end_line or lnum, entry.end_col or col + 1
13341334
-- stale line/col can cause out-of-range, e.g. marks
13351335
vim.F.nil_wrap(api.nvim_buf_set_extmark)(buf, self.ns_previewer, lnum - 1, col - 1, {

0 commit comments

Comments
 (0)