Skip to content

Commit ddadd03

Browse files
committed
Fix additionalTextEdits being ignored
Regression was introduced in 6f4fdc7. The logic was still fine if the LSP server delayed the additionalTextEdits field, but if we already got it, we ended up ignoring it. Fix this by checking for additionalTextEdits outside the delayed-resolve condition. Also see yegappan#389
1 parent b44a475 commit ddadd03

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

autoload/lsp/completion.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -591,9 +591,9 @@ def LspCompleteDone(bnr: number)
591591
# additional text edits. So try to resolve the completion item now to get
592592
# the text edits.
593593
completionData = lspserver.resolveCompletion(completionData, true)
594-
if !completionData->get('additionalTextEdits', {})->empty()
595-
textedit.ApplyTextEdits(bnr, completionData.additionalTextEdits)
596-
endif
594+
endif
595+
if !completionData->get('additionalTextEdits', {})->empty()
596+
textedit.ApplyTextEdits(bnr, completionData.additionalTextEdits)
597597
endif
598598

599599
if completionData->has_key('command')

0 commit comments

Comments
 (0)