Skip to content

Commit 4018359

Browse files
authored
Add check for server entry in buffer entry.
1 parent f7ccf00 commit 4018359

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autoload/lsp.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ function! s:text_changes(buf, server_name) abort
750750
endif
751751

752752
" When syncKind is Incremental and previous content is saved.
753-
if l:sync_kind == 2 && has_key(s:file_content, a:buf)
753+
if l:sync_kind == 2 && has_key(s:file_content, a:buf) && has_key(s:file_content[a:buf], a:server_name)
754754
" compute diff
755755
let l:old_content = s:get_last_file_content(a:buf, a:server_name)
756756
let l:new_content = lsp#utils#buffer#_get_lines(a:buf)

0 commit comments

Comments
 (0)