Skip to content

Commit 9f5dd1b

Browse files
committed
fix: row not exist in cache
1 parent 767ea9a commit 9f5dd1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/hlchunk/mods/chunk/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ function ChunkMod:render(range, opts)
156156
row_opts.virt_text = { { vt, text_hl } }
157157
row_opts.virt_text_win_col = virt_text_win_col_list[i]
158158
local row = row_list[i]
159-
if api.nvim_buf_is_valid(range.bufnr) and api.nvim_buf_line_count(range.bufnr) > row then
159+
if row and api.nvim_buf_is_valid(range.bufnr) and api.nvim_buf_line_count(range.bufnr) > row then
160160
api.nvim_buf_set_extmark(range.bufnr, self.meta.ns_id, row, 0, row_opts)
161161
end
162162
end

0 commit comments

Comments
 (0)