From c043c1cd413f6e5c1deefb722fd9df3fde11891c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=81=93=E5=8C=96=E5=B8=AB?= Date: Tue, 18 Feb 2020 21:34:39 +0900 Subject: [PATCH] Fixed statusbar item disappearing when changing settings. --- extension.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension.js b/extension.js index a52a404..0f632c6 100644 --- a/extension.js +++ b/extension.js @@ -5,7 +5,7 @@ var path = require('path'); var sb = null; function OnStatusBarUpdate( textEditor ) { - textEditor = textEditor ? textEditor : vscode.window.activeTextEditor; + textEditor = (textEditor && textEditor.viewColumn) ? textEditor : vscode.window.activeTextEditor; if( textEditor ){ var config = vscode.workspace.getConfiguration('ActiveFileInStatusBar'); if( !textEditor.document || textEditor.document.isUntitled ){