Skip to content

Commit

Permalink
fix: within_query_bounds including 1 position after bounds
Browse files Browse the repository at this point in the history
Closes #890
Closes #875
  • Loading branch information
Saghen committed Jan 6, 2025
1 parent c2f831f commit 36ba8eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/blink/cmp/completion/trigger/context.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ end
function context:within_query_bounds(cursor)
local row, col = cursor[1], cursor[2]
local bounds = self.bounds
return row == bounds.line_number and col >= bounds.start_col and col <= (bounds.start_col + bounds.length)
return row == bounds.line_number and col >= bounds.start_col and col < (bounds.start_col + bounds.length)
end

function context.get_mode() return vim.api.nvim_get_mode().mode == 'c' and 'cmdline' or 'default' end
Expand Down

0 comments on commit 36ba8eb

Please sign in to comment.