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 @@ -1516,12 +1516,15 @@ impl Server {
15161516
15171517 fn did_close ( & self , params : DidCloseTextDocumentParams ) {
15181518 let uri = params. text_document . uri . to_file_path ( ) . unwrap ( ) ;
1519- self . version_info . lock ( ) . remove ( & uri) ;
1519+ let version = self
1520+ . version_info
1521+ . lock ( )
1522+ . remove ( & uri)
1523+ . map ( |version| version + 1 ) ;
15201524 let open_files = self . open_files . dupe ( ) ;
15211525 open_files. write ( ) . remove ( & uri) ;
1522- // TODO: should we use the last version or None?
15231526 self . connection
1524- . publish_diagnostics_for_uri ( params. text_document . uri , Vec :: new ( ) , None ) ;
1527+ . publish_diagnostics_for_uri ( params. text_document . uri , Vec :: new ( ) , version ) ;
15251528 let state = self . state . dupe ( ) ;
15261529 let lsp_queue = self . lsp_queue . dupe ( ) ;
15271530 let open_files = self . open_files . dupe ( ) ;
You can’t perform that action at this time.
0 commit comments