Skip to content

Commit da99206

Browse files
mattnprabirshrestha
authored andcommitted
Check buffer exists
1 parent 337cd8d commit da99206

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

autoload/lsp.vim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,9 @@ endfunction
216216
function! s:on_text_document_did_close() abort
217217
let l:buf = bufnr('%')
218218
call lsp#log('s:on_text_document_did_close()', l:buf)
219-
call remove(s:file_content, l:buf)
219+
if has_key(s:file_content, l:buf)
220+
call remove(s:file_content, l:buf)
221+
endif
220222
endfunction
221223

222224
function! s:ensure_flush_all(buf, server_names) abort

0 commit comments

Comments
 (0)