From 8e4aae804cf754758beacdab9a36b60dbcbfda0d Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Tue, 25 Apr 2023 22:32:46 -0700 Subject: [PATCH] Fix #180857. Empty cmd+f should not unset search keyword. (#180901) --- .../contrib/notebook/browser/contrib/find/notebookFindWidget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.ts b/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.ts index 4f2b6c0632b..a2400b2ea93 100644 --- a/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.ts +++ b/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.ts @@ -236,7 +236,7 @@ class NotebookFindWidget extends SimpleFindReplaceWidget implements INotebookEdi override async show(initialInput?: string, options?: IShowNotebookFindWidgetOptions): Promise { const searchStringUpdate = this._state.searchString !== initialInput; super.show(initialInput, options); - this._state.change({ searchString: initialInput ?? '', isRevealed: true }, false); + this._state.change({ searchString: initialInput ?? this._state.searchString, isRevealed: true }, false); if (typeof options?.matchIndex === 'number') { if (!this._findModel.findMatches.length) {