mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-17 06:17:12 +09:00
Apply additional edits if they exist
This commit is contained in:
@@ -238,6 +238,14 @@ func LSPComplete(b *Buffer) []Completion {
|
||||
Start: toLoc(item.TextEdit.Range.Start),
|
||||
End: toLoc(item.TextEdit.Range.End),
|
||||
}}
|
||||
for _, e := range item.AdditionalTextEdits {
|
||||
d := Delta{
|
||||
Text: []byte(e.NewText),
|
||||
Start: toLoc(e.Range.Start),
|
||||
End: toLoc(e.Range.End),
|
||||
}
|
||||
completions[i].Edits = append(completions[i].Edits, d)
|
||||
}
|
||||
} else {
|
||||
var t string
|
||||
if len(item.InsertText) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user