Fix invalid temporary text

This commit is contained in:
hrsh7th
2021-08-27 23:06:35 +09:00
parent 61984efaf0
commit 405581e740
5 changed files with 27 additions and 4 deletions

View File

@@ -109,12 +109,13 @@ entry.get_word = function(self)
end
elseif misc.safe(self.completion_item.insertText) then
word = str.trim(self.completion_item.insertText)
word = str.get_word(word)
if self.completion_item.insertTextFormat == types.lsp.InsertTextFormat.Snippet then
word = str.get_word(word)
end
else
word = str.trim(self.completion_item.label)
word = str.get_word(word, '')
end
return word
return str.oneline(word)
end)
end