From 4018359f1133441a24f4ffe4efa738c1325f379a Mon Sep 17 00:00:00 2001 From: Rodrigo Goya Date: Sun, 7 Apr 2024 11:17:08 -0700 Subject: [PATCH] Add check for server entry in buffer entry. --- 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)