From 36ba8eb9c166c21d6d2a8b5f88f9c55d1966b383 Mon Sep 17 00:00:00 2001 From: Liam Dyer Date: Mon, 6 Jan 2025 13:42:18 -0500 Subject: [PATCH] fix: `within_query_bounds` including 1 position after bounds Closes #890 Closes #875 --- lua/blink/cmp/completion/trigger/context.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/blink/cmp/completion/trigger/context.lua b/lua/blink/cmp/completion/trigger/context.lua index a6b36ca0..6eb367d8 100644 --- a/lua/blink/cmp/completion/trigger/context.lua +++ b/lua/blink/cmp/completion/trigger/context.lua @@ -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