Skip to content

Commit

Permalink
Improve language filter placement, fixes #145711 (#147727)
Browse files Browse the repository at this point in the history
  • Loading branch information
rzhao271 authored Apr 20, 2022
1 parent d7dbb0b commit f171e5e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,11 @@ export class SettingsEditor2 extends EditorPane {
}
}));
this._register(this.settingRenderers.onApplyLanguageFilter((lang: string) => {
this.focusSearch(`@${LANGUAGE_SETTING_TAG}${lang}`);
if (this.searchWidget) {
// Prepend the language filter to the query.
const newQuery = `@${LANGUAGE_SETTING_TAG}${lang} ${this.searchWidget.getValue().trimStart()}`;
this.focusSearch(newQuery, false);
}
}));

this.settingsTree = this._register(this.instantiationService.createInstance(SettingsTree,
Expand Down

0 comments on commit f171e5e

Please sign in to comment.