Fix #180857. Empty cmd+f should not unset search keyword. (#180901)

This commit is contained in:
Peng Lyu
2023-04-25 22:32:46 -07:00
committed by GitHub
parent 2c51b3de32
commit 8e4aae804c
@@ -236,7 +236,7 @@ class NotebookFindWidget extends SimpleFindReplaceWidget implements INotebookEdi
override async show(initialInput?: string, options?: IShowNotebookFindWidgetOptions): Promise<void> {
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) {