File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1597,12 +1597,15 @@ impl Server {
15971597
15981598 fn did_close ( & self , params : DidCloseTextDocumentParams ) {
15991599 let uri = params. text_document . uri . to_file_path ( ) . unwrap ( ) ;
1600- self . version_info . lock ( ) . remove ( & uri) ;
1600+ let version = self
1601+ . version_info
1602+ . lock ( )
1603+ . remove ( & uri)
1604+ . map ( |version| version + 1 ) ;
16011605 let open_files = self . open_files . dupe ( ) ;
16021606 open_files. write ( ) . remove ( & uri) ;
1603- // TODO: should we use the last version or None?
16041607 self . connection
1605- . publish_diagnostics_for_uri ( params. text_document . uri , Vec :: new ( ) , None ) ;
1608+ . publish_diagnostics_for_uri ( params. text_document . uri , Vec :: new ( ) , version ) ;
16061609 let state = self . state . dupe ( ) ;
16071610 let lsp_queue = self . lsp_queue . dupe ( ) ;
16081611 let open_files = self . open_files . dupe ( ) ;
You can’t perform that action at this time.
0 commit comments