From ca1a874dc825368c3dcfe5c2d4fa8c6ca5c91efa Mon Sep 17 00:00:00 2001 From: rebornix Date: Mon, 28 Mar 2022 12:46:01 -0700 Subject: [PATCH] fix #142756. --- .../contrib/notebook/browser/contrib/find/findController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/notebook/browser/contrib/find/findController.ts b/src/vs/workbench/contrib/notebook/browser/contrib/find/findController.ts index 99a308a9bd4ed..76eebf9ffe38c 100644 --- a/src/vs/workbench/contrib/notebook/browser/contrib/find/findController.ts +++ b/src/vs/workbench/contrib/notebook/browser/contrib/find/findController.ts @@ -88,7 +88,7 @@ export class NotebookFindWidget extends SimpleFindReplaceWidget implements INote } const matches = this._findModel.findMatches; - this._replaceAllBtn.setEnabled(matches.find(match => match.modelMatchCount < match.matches.length) === null); + this._replaceAllBtn.setEnabled(matches.length > 0 && matches.find(match => match.modelMatchCount < match.matches.length) === undefined); if (e.filters) { this._findInput.updateFilterState((this._state.filters?.markupPreview ?? false) || (this._state.filters?.codeOutput ?? false));