Skip to content

Commit 194acc0

Browse files
authored
fix(util): skip captures out of order (#27)
1 parent 262ca27 commit 194acc0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/copilot-lsp/util.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ function M.hl_text_to_virt_lines(text, lang)
142142

143143
vim.iter(captures):each(function(cap)
144144
-- skip if the capture is before the current position
145-
if cap.end_row < curr_row or (cap.end_row == curr_row and cap.end_col < curr_col) then
145+
if cap.end_row < curr_row or (cap.end_row == curr_row and cap.end_col <= curr_col) then
146146
return
147147
end
148148

0 commit comments

Comments
 (0)