File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1984,17 +1984,21 @@ impl Server {
19841984 let Some ( path) = self . path_for_uri ( & url) else {
19851985 return ;
19861986 } ;
1987- self . version_info . lock ( ) . remove ( & path) ;
1987+ let version = self
1988+ . version_info
1989+ . lock ( )
1990+ . remove ( & uri)
1991+ . map ( |version| version + 1 ) ;
19881992 let open_files = self . open_files . dupe ( ) ;
19891993 if let Some ( LspFile :: Notebook ( notebook) ) = open_files. write ( ) . remove ( & path) . as_deref ( ) {
19901994 for cell in notebook. cell_urls ( ) {
19911995 self . connection
1992- . publish_diagnostics_for_uri ( cell. clone ( ) , Vec :: new ( ) , None ) ;
1996+ . publish_diagnostics_for_uri ( cell. clone ( ) , Vec :: new ( ) , version ) ;
19931997 self . open_notebook_cells . write ( ) . remove ( cell) ;
19941998 }
19951999 } else {
19962000 self . connection
1997- . publish_diagnostics_for_uri ( url. clone ( ) , Vec :: new ( ) , None ) ;
2001+ . publish_diagnostics_for_uri ( url, Vec :: new ( ) , version ) ;
19982002 }
19992003 self . unsaved_file_tracker . forget_uri_path ( & url) ;
20002004 let state = self . state . dupe ( ) ;
You can’t perform that action at this time.
0 commit comments