We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8273d53 commit 5bbf43bCopy full SHA for 5bbf43b
autoload/go/lsp.vim
@@ -1428,9 +1428,9 @@ function s:applyTextEdits(msg) abort
1428
if l:msg.range.start.character > 0
1429
let l:preSliceEnd = go#lsp#lsp#PositionOf(l:startcontent, l:msg.range.start.character-1) - 1
1430
let l:startcontent = l:startcontent[:l:preSliceEnd]
1431
- elseif l:endline == l:startline && l:msg.range.end.character == 0
1432
- " l:startcontent should be the empty string when l:text is to be
1433
- " inserted at the beginning of the line.
+ elseif l:endline == l:startline && (l:msg.range.end.character == 0 || l:msg.range.start.character == 0)
+ " l:startcontent should be the empty string when l:text is a
+ " replacement at the beginning of the line.
1434
let l:startcontent = ''
1435
endif
1436
0 commit comments