File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
src/vs/workbench/contrib/notebook/browser/contrib/find Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,25 @@ export class FindModel extends Disposable {
162162 } ;
163163
164164
165+ if ( e . isReplaceRevealed && ! this . _state . isReplaceRevealed ) {
166+ // replace is hidden, we need to switch all markdown cells to preview mode
167+ const viewModel = this . _notebookEditor . _getViewModel ( ) as NotebookViewModel | undefined ;
168+ if ( ! viewModel ) {
169+ return ;
170+ }
171+
172+ for ( let i = 0 ; i < viewModel . length ; i ++ ) {
173+ const cell = viewModel . cellAt ( i ) ;
174+ if ( cell && cell . cellKind === CellKind . Markup ) {
175+ if ( cell . getEditState ( ) === CellEditState . Editing && cell . editStateSource === 'find' ) {
176+ cell . updateEditState ( CellEditState . Preview , 'find' ) ;
177+ }
178+ }
179+ }
180+
181+ return ;
182+ }
183+
165184 if ( e . isReplaceRevealed ) {
166185 updateEditingState ( ) ;
167186 } else if ( ( e . filters || e . isRevealed || e . searchString || e . replaceString ) && this . _state . isRevealed && this . _state . isReplaceRevealed ) {
You can’t perform that action at this time.
0 commit comments