Skip to content

Commit

Permalink
fix #29553
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Sep 12, 2018
1 parent 8b04cae commit deaf775
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/vs/workbench/parts/quickopen/browser/commandsHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,6 @@ export class CommandsHandler extends QuickOpenHandler {

static readonly ID = 'workbench.picker.commands';

private lastSearchValue: string;
private commandHistoryEnabled: boolean;
private commandsHistory: CommandsHistory;

Expand Down Expand Up @@ -411,7 +410,9 @@ export class CommandsHandler extends QuickOpenHandler {
}

searchValue = searchValue.trim();
this.lastSearchValue = searchValue;

// Remember as last command palette input
lastCommandPaletteInput = searchValue;

// Editor Actions
const activeTextEditorWidget = this.editorService.activeTextEditorWidget;
Expand Down Expand Up @@ -512,9 +513,6 @@ export class CommandsHandler extends QuickOpenHandler {

private onBeforeRunCommand(commandId: string): void {

// Remember as last command palette input
lastCommandPaletteInput = this.lastSearchValue;

// Remember in commands history
this.commandsHistory.push(commandId);
}
Expand Down Expand Up @@ -572,12 +570,6 @@ export class CommandsHandler extends QuickOpenHandler {
getEmptyLabel(searchString: string): string {
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);

0 comments on commit deaf775

Please sign in to comment.