提交 deaf7756 编写于 作者: B Benjamin Pasero

fix #29553

上级 8b04cae3
...@@ -377,7 +377,6 @@ export class CommandsHandler extends QuickOpenHandler { ...@@ -377,7 +377,6 @@ export class CommandsHandler extends QuickOpenHandler {
static readonly ID = 'workbench.picker.commands'; static readonly ID = 'workbench.picker.commands';
private lastSearchValue: string;
private commandHistoryEnabled: boolean; private commandHistoryEnabled: boolean;
private commandsHistory: CommandsHistory; private commandsHistory: CommandsHistory;
...@@ -411,7 +410,9 @@ export class CommandsHandler extends QuickOpenHandler { ...@@ -411,7 +410,9 @@ export class CommandsHandler extends QuickOpenHandler {
} }
searchValue = searchValue.trim(); searchValue = searchValue.trim();
this.lastSearchValue = searchValue;
// Remember as last command palette input
lastCommandPaletteInput = searchValue;
// Editor Actions // Editor Actions
const activeTextEditorWidget = this.editorService.activeTextEditorWidget; const activeTextEditorWidget = this.editorService.activeTextEditorWidget;
...@@ -512,9 +513,6 @@ export class CommandsHandler extends QuickOpenHandler { ...@@ -512,9 +513,6 @@ export class CommandsHandler extends QuickOpenHandler {
private onBeforeRunCommand(commandId: string): void { private onBeforeRunCommand(commandId: string): void {
// Remember as last command palette input
lastCommandPaletteInput = this.lastSearchValue;
// Remember in commands history // Remember in commands history
this.commandsHistory.push(commandId); this.commandsHistory.push(commandId);
} }
...@@ -572,12 +570,6 @@ export class CommandsHandler extends QuickOpenHandler { ...@@ -572,12 +570,6 @@ export class CommandsHandler extends QuickOpenHandler {
getEmptyLabel(searchString: string): string { getEmptyLabel(searchString: string): string {
return nls.localize('noCommandsMatching', "No commands matching"); return nls.localize('noCommandsMatching', "No commands matching");
} }
onClose(canceled: boolean): void {
if (canceled) {
lastCommandPaletteInput = void 0; // clear last input when user canceled quick open
}
}
} }
registerEditorAction(CommandPaletteEditorAction); registerEditorAction(CommandPaletteEditorAction);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册