Skip to content

Commit

Permalink
Add check for server entry in buffer entry.
Browse files Browse the repository at this point in the history
  • Loading branch information
rgoya authored Apr 7, 2024
1 parent f7ccf00 commit 4018359
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/lsp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ function! s:text_changes(buf, server_name) abort
endif

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

0 comments on commit 4018359

Please sign in to comment.