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) {