mirror of
https://github.com/Microsoft/vscode
synced 2024-10-13 23:09:01 +00:00
quick access - include history still when not searching
This commit is contained in:
parent
d519182aa9
commit
a8e13f1c84
|
@ -194,15 +194,16 @@ export class AnythingQuickAccessProvider extends PickerQuickAccessProvider<IAnyt
|
|||
private readonly labelOnlyEditorHistoryPickAccessor = new QuickPickItemScorerAccessor({ skipDescription: true });
|
||||
|
||||
protected getEditorHistoryPicks(query: IPreparedQuery, range: IRange | undefined): Array<IAnythingQuickPickItem> {
|
||||
if (!this.configuration.includeHistory) {
|
||||
return []; // disabled
|
||||
}
|
||||
|
||||
// Just return all history entries if not searching
|
||||
if (!query.value) {
|
||||
return this.historyService.getHistory().map(editor => this.createAnythingPick(editor, range));
|
||||
}
|
||||
|
||||
if (!this.configuration.includeHistory) {
|
||||
return []; // disabled when searching
|
||||
}
|
||||
|
||||
// Only match on label of the editor unless the search includes path separators
|
||||
const editorHistoryScorerAccessor = query.containsPathSeparator ? quickPickItemScorerAccessor : this.labelOnlyEditorHistoryPickAccessor;
|
||||
|
||||
|
|
Loading…
Reference in a new issue