Skip to content

Commit

Permalink
fix: incorrect bounds when removing word under cursor in buffer sources
Browse files Browse the repository at this point in the history
Closes #560
  • Loading branch information
Saghen committed Dec 16, 2024
1 parent 3ce3dea commit d682165
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lua/blink/cmp/sources/buffer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ local function get_buf_text(bufnr)
local start_col = column
while start_col > 1 do
local char = line:sub(start_col, start_col)
if char:match('[%w_\\-]') == nil then
start_col = start_col + 1
break
end
if char:match('[%w_\\-]') == nil then break end
start_col = start_col - 1
end
local end_col = column
Expand Down

0 comments on commit d682165

Please sign in to comment.