提交 a05176fd 编写于 作者: J Johannes Rieken

fix #51647

上级 dabaca29
......@@ -434,9 +434,11 @@ export class OutlinePanel extends ViewletPanel {
dispose(this._editorDisposables);
this._editorDisposables = new Array();
this._input.disable();
this._input.value = '';
this._progressBar.infinite().show(150);
this._input.disable();
if (!event) {
this._input.value = '';
}
if (!editor || !DocumentSymbolProviderRegistry.has(editor.getModel())) {
return this._showMessage(localize('no-editor', "There are no editors open that can provide outline information."));
......@@ -510,7 +512,7 @@ export class OutlinePanel extends ViewletPanel {
// on first type -> capture tree state
// on erase -> restore captured tree state
let beforePatternState: OutlineTreeState;
this._editorDisposables.push(this._input.onDidChange(async pattern => {
let onInputValueChanged = async pattern => {
this._contextKeyFiltered.set(pattern.length > 0);
......@@ -530,7 +532,9 @@ export class OutlinePanel extends ViewletPanel {
await OutlineTreeState.restore(this._tree, beforePatternState);
beforePatternState = undefined;
}
}));
};
onInputValueChanged(this._input.value);
this._editorDisposables.push(this._input.onDidChange(onInputValueChanged));
this._editorDisposables.push({
dispose: () => this._contextKeyFiltered.reset()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册