File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,8 @@ let ignore_text_document_change = false;
8888// True to ignore the next active editor change event, since a `CurrentFile`
8989// message from the Client caused this change.
9090let ignore_active_editor_change = false ;
91+ // True to not report the next error.
92+ let quiet_next_error = false ;
9193
9294// ### Message types
9395//
@@ -267,8 +269,11 @@ export const activate = (context: vscode.ExtensionContext) => {
267269 console . log (
268270 "CodeChat Editor extension: shut down webview."
269271 ) ;
270- await stop_client ( ) ;
272+ // Closing the webview abruptly closes the Client,
273+ // which produces an error. Don't report it.
274+ quiet_next_error = true ;
271275 webview_panel = undefined ;
276+ await stop_client ( ) ;
272277 } ) ;
273278
274279 // Render when the webview panel is shown.
@@ -666,6 +671,10 @@ const stop_client = async () => {
666671
667672// Provide an error message in the panel if possible.
668673const show_error = ( message : string ) => {
674+ if ( quiet_next_error ) {
675+ quiet_next_error = false ;
676+ return ;
677+ }
669678 if ( webview_panel !== undefined ) {
670679 // If the panel was displaying other content, reset it for errors.
671680 if (
You can’t perform that action at this time.
0 commit comments