Skip to content

Commit 79bdf5d

Browse files
authored
fix: searching for lines in debug console that start with "!" microsoft#174146 (microsoft#210178)
* Add "\" escape character to filter field * Add "\escape" tooltip to filter field
1 parent 46b41aa commit 79bdf5d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/vs/workbench/contrib/debug/browser/repl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export class Repl extends FilterViewPane implements IHistoryNavigationWidget {
143143
super({
144144
...options,
145145
filterOptions: {
146-
placeholder: localize({ key: 'workbench.debug.filter.placeholder', comment: ['Text in the brackets after e.g. is not localizable'] }, "Filter (e.g. text, !exclude)"),
146+
placeholder: localize({ key: 'workbench.debug.filter.placeholder', comment: ['Text in the brackets after e.g. is not localizable'] }, "Filter (e.g. text, !exclude, \\escape)"),
147147
text: filterText,
148148
history: JSON.parse(storageService.get(FILTER_HISTORY_STORAGE_KEY, StorageScope.WORKSPACE, '[]')) as string[],
149149
}

src/vs/workbench/contrib/debug/browser/replFilter.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ export class ReplFilter implements ITreeFilter<IReplElement> {
2828
if (query && query !== '') {
2929
const filters = splitGlobAware(query, ',').map(s => s.trim()).filter(s => !!s.length);
3030
for (const f of filters) {
31-
if (f.startsWith('!')) {
31+
if (f.startsWith('\\')) {
32+
this._parsedQueries.push({ type: 'include', query: f.slice(1) });
33+
} else if (f.startsWith('!')) {
3234
this._parsedQueries.push({ type: 'exclude', query: f.slice(1) });
3335
} else {
3436
this._parsedQueries.push({ type: 'include', query: f });

0 commit comments

Comments
 (0)