Regression was introduced in
6f4fdc7bcc3a1ba041c6196b85b506bd0c207cf0.
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 #389
# additional text edits. So try to resolve the completion item now to get
# the text edits.
completionData = lspserver.resolveCompletion(completionData, true)
- if !completionData->get('additionalTextEdits', {})->empty()
- textedit.ApplyTextEdits(bnr, completionData.additionalTextEdits)
- endif
+ endif
+ if !completionData->get('additionalTextEdits', {})->empty()
+ textedit.ApplyTextEdits(bnr, completionData.additionalTextEdits)
endif
if completionData->has_key('command')