From 6b7aabde99c409a3c04e1a7d80bbd1b0000c4158 Mon Sep 17 00:00:00 2001 From: Rodrigo Goya Date: Sat, 20 Jul 2024 07:59:14 +0200 Subject: [PATCH] Add check for server entry in buffer entry. (#1548) --- autoload/lsp.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/lsp.vim b/autoload/lsp.vim index a2ab0106c..dbb9d77bb 100644 --- a/autoload/lsp.vim +++ b/autoload/lsp.vim @@ -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)