File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -135,6 +135,7 @@ function! s:register_events() abort
135
135
autocmd BufReadPost * call s: on_text_document_did_open ()
136
136
autocmd BufWritePost * call s: on_text_document_did_save ()
137
137
autocmd BufWinLeave * call s: on_text_document_did_close ()
138
+ autocmd BufWipeout * call s: on_buf_wipeout (bufnr (' <afile>' ))
138
139
autocmd InsertLeave * call s: on_text_document_did_change ()
139
140
autocmd CursorMoved * call s: on_cursor_moved ()
140
141
augroup END
@@ -216,8 +217,11 @@ endfunction
216
217
function ! s: on_text_document_did_close () abort
217
218
let l: buf = bufnr (' %' )
218
219
call lsp#log (' s:on_text_document_did_close()' , l: buf )
219
- if has_key (s: file_content , l: buf )
220
- call remove (s: file_content , l: buf )
220
+ endfunction
221
+
222
+ function ! s: on_buf_wipeout (buf ) abort
223
+ if has_key (s: file_content , a: buf )
224
+ call remove (s: file_content , a: buf )
221
225
endif
222
226
endfunction
223
227
You can’t perform that action at this time.
0 commit comments