mirror of
https://github.com/Microsoft/vscode
synced 2024-09-29 07:51:27 +00:00
alert SR users of tree find result count (#225264)
This commit is contained in:
parent
297cd2325d
commit
92feede427
|
@ -36,6 +36,7 @@ import { localize } from 'vs/nls';
|
|||
import { IHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegate';
|
||||
import { createInstantHoverDelegate, getDefaultHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegateFactory';
|
||||
import { autorun, constObservable } from 'vs/base/common/observable';
|
||||
import { alert } from 'vs/base/browser/ui/aria/aria';
|
||||
|
||||
class TreeElementsDragAndDropData<T, TFilterData, TContext> extends ElementsDragAndDropData<T, TContext> {
|
||||
|
||||
|
@ -1144,6 +1145,7 @@ class FindController<T, TFilterData> implements IDisposable {
|
|||
const noMatches = this.filter.totalCount > 0 && this.filter.matchCount === 0;
|
||||
|
||||
if (this.pattern && noMatches) {
|
||||
alert(localize('replFindNoResults', "No results"));
|
||||
if (this.tree.options.showNotFoundMessage ?? true) {
|
||||
this.widget?.showMessage({ type: MessageType.WARNING, content: localize('not found', "No elements found.") });
|
||||
} else {
|
||||
|
@ -1151,6 +1153,9 @@ class FindController<T, TFilterData> implements IDisposable {
|
|||
}
|
||||
} else {
|
||||
this.widget?.clearMessage();
|
||||
if (this.pattern) {
|
||||
alert(localize('replFindResults', "{0} results", this.filter.matchCount));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue