We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 84361bd commit fc348daCopy full SHA for fc348da
lua/blink/cmp/accept/text-edits.lua
@@ -48,16 +48,16 @@ function text_edits.guess_text_edit(bufnr, item)
48
49
-- Search forward/backward for the start/end of the word
50
local start_col = current_col
51
- while start_col > 1 do
52
- local char = line:sub(start_col - 1, start_col - 1)
+ while start_col > 0 do
+ local char = line:sub(start_col, start_col)
53
if char:match('[%w_\\-]') == nil then break end
54
start_col = start_col - 1
55
end
56
57
-- convert to 0-index
58
return {
59
range = {
60
- start = { line = current_line - 1, character = start_col - 1 },
+ start = { line = current_line - 1, character = start_col },
61
['end'] = { line = current_line - 1, character = current_col },
62
},
63
newText = word,
0 commit comments