File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed
Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -104,19 +104,14 @@ export class DocumentManager implements Configurable {
104104 return document . getEditorSettings ( this . editorSettings ) ;
105105 }
106106
107- clearIndentationForDocument ( uri : string ) : void {
108- const document = this . documentMap . get ( uri ) ;
109- if ( document ) {
110- document . clearIndentation ( ) ;
111- this . documentMap . delete ( uri ) ;
112- }
107+ removeDocument ( uri : string ) : void {
108+ this . documentMap . delete ( uri ) ;
113109 }
114110
115111 clearAllStoredIndentation ( ) : void {
116112 for ( const document of this . documentMap . values ( ) ) {
117113 document . clearIndentation ( ) ;
118114 }
119- this . documentMap . clear ( ) ;
120115 }
121116
122117 private onEditorSettingsChanged ( newEditorSettings : EditorSettings ) : void {
Original file line number Diff line number Diff line change @@ -131,8 +131,8 @@ export function didCloseHandler(components: ServerComponents): (event: TextDocum
131131 // Cancel any pending delayed Guard validation for this document
132132 components . guardService . cancelDelayedValidation ( documentUri ) ;
133133
134- // Clear stored indentation detection for this document
135- components . documentManager . clearIndentationForDocument ( documentUri ) ;
134+ // Remove document from DocumentManager map
135+ components . documentManager . removeDocument ( documentUri ) ;
136136
137137 components . syntaxTreeManager . deleteSyntaxTree ( documentUri ) ;
138138
You can’t perform that action at this time.
0 commit comments