Improve patching implementation
This commit is contained in:
@@ -192,7 +192,7 @@ entry.get_vim_item = function(self, suggeset_offset)
|
||||
return self.cache:ensure({ 'get_vim_item', suggeset_offset }, function()
|
||||
local diff = vim.str_byteindex(self.context.cursor_line, self:get_replace_range()['end'].character)
|
||||
local item = config.get().formatting.format(self, suggeset_offset)
|
||||
item.word = str.remove_suffix(item.word, string.sub(self.context.cursor_line, self.context.cursor.col, diff + 1))
|
||||
item.word = str.remove_suffix(item.word, string.sub(self.context.cursor_line, self.context.cursor.col, diff))
|
||||
item.equal = 1
|
||||
item.empty = 1
|
||||
item.dup = self.completion_item.dup or 1
|
||||
|
||||
Reference in New Issue
Block a user