Skip to content

Commit 6b7aabd

Browse files
authored
Add check for server entry in buffer entry. (#1548)
1 parent e05c42f commit 6b7aabd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autoload/lsp.vim

+1-1
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)