Skip to content

Commit

Permalink
Add check for server entry in buffer entry. (#1548)
Browse files Browse the repository at this point in the history
  • Loading branch information
rgoya authored Jul 20, 2024
1 parent e05c42f commit 6b7aabd
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 6b7aabd

Please sign in to comment.