@@ -157,18 +157,18 @@ function! s:on_text_document_did_open() abort
157
157
endfunction
158
158
159
159
function ! s: on_text_document_did_save () abort
160
- call lsp#log (' s:on_text_document_did_save()' , bufnr (' %' ))
161
160
let l: buf = bufnr (' %' )
161
+ call lsp#log (' s:on_text_document_did_save()' , l: buf )
162
162
for l: server_name in lsp#get_whitelisted_servers ()
163
- call s: ensure_flush (bufnr ( ' % ' ) , l: server_name , {result- >s: call_did_save (l: buf , l: server_name , result, function (' s:Noop' ))})
163
+ call s: ensure_flush (: buf , l: server_name , {result- >s: call_did_save (l: buf , l: server_name , result, function (' s:Noop' ))})
164
164
endfor
165
165
endfunction
166
166
167
167
function ! s: on_text_document_did_change () abort
168
- call lsp#log (' s:on_text_document_did_change()' , bufnr (' %' ))
169
168
let l: buf = bufnr (' %' )
169
+ call lsp#log (' s:on_text_document_did_change()' , l: buf )
170
170
for l: server_name in lsp#get_whitelisted_servers ()
171
- call s: ensure_flush (bufnr ( ' % ' ) , l: server_name , function (' s:Noop' ))
171
+ call s: ensure_flush (l: buf , l: server_name , function (' s:Noop' ))
172
172
endfor
173
173
endfunction
174
174
@@ -214,7 +214,9 @@ function! s:call_did_save(buf, server_name, result, cb) abort
214
214
endfunction
215
215
216
216
function ! s: on_text_document_did_close () abort
217
- call lsp#log (' s:on_text_document_did_close()' , bufnr (' %' ))
217
+ let l: buf = bufnr (' %' )
218
+ call lsp#log (' s:on_text_document_did_close()' , l: buf )
219
+ call remove (s: file_content , l: buf )
218
220
endfunction
219
221
220
222
function ! s: ensure_flush_all (buf , server_names) abort
0 commit comments