turn markdown cell into preview mode after hiding find.

This commit is contained in:
rebornix
2021-04-24 12:40:22 -07:00
parent 27388ab7cf
commit 08d37a85a3
2 changed files with 7 additions and 0 deletions
@@ -362,6 +362,12 @@ export class NotebookFindWidget extends SimpleFindReplaceWidget implements INote
this._previousFocusElement.focus();
this._previousFocusElement = undefined;
}
this._notebookEditor.viewModel?.viewCells.forEach(cell => {
if (cell.getEditState() === CellEditState.Editing && cell.editStateSource === 'find') {
cell.updateEditState(CellEditState.Preview, 'find');
}
});
}
override _updateMatchesCount(): void {
@@ -247,6 +247,7 @@ export interface ICellViewModel extends IGenericCellViewModel {
readonly layoutInfo: { totalHeight: number; };
readonly onDidChangeLayout: Event<{ totalHeight?: boolean | number; outerWidth?: number; }>;
readonly onDidChangeCellStatusBarItems: Event<void>;
readonly editStateSource: string;
dragging: boolean;
handle: number;
uri: URI;