Skip to content

Commit

Permalink
fix(entry/get_replace_range): workaround for end char matching curren…
Browse files Browse the repository at this point in the history
…t cursor position

fixes #1156
  • Loading branch information
lvimuser committed Sep 10, 2022
1 parent 913eb85 commit 52e09a5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/cmp/entry.lua
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,9 @@ entry.get_replace_range = function(self)
else
replace_range = self:get_completion_item().textEdit.range
end
else
end

if not replace_range or (self.context.cursor.character == replace_range['end'].character) then
replace_range = {
start = {
line = self.source_replace_range.start.line,
Expand Down

0 comments on commit 52e09a5

Please sign in to comment.