File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Extension/src/LanguageServer Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -1858,7 +1858,11 @@ export class DefaultClient implements Client {
18581858 public onDidOpenTextDocument ( document : vscode . TextDocument ) : void {
18591859 if ( document . uri . scheme === "file" ) {
18601860 const uri : string = document . uri . toString ( ) ;
1861- openFileVersions . set ( uri , document . version ) ;
1861+ const oldVersion : number | undefined = openFileVersions . get ( uri ) ;
1862+ const newVersion : number = document . version ;
1863+ if ( oldVersion === undefined || newVersion > oldVersion ) {
1864+ openFileVersions . set ( uri , document . version ) ;
1865+ }
18621866 void SessionState . buildAndDebugIsSourceFile . set ( util . isCppOrCFile ( document . uri ) ) ;
18631867 void SessionState . buildAndDebugIsFolderOpen . set ( util . isFolderOpen ( document . uri ) ) ;
18641868 } else {
You can’t perform that action at this time.
0 commit comments