File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/vs/workbench/contrib/notebook/browser/contrib/find Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,13 @@ export class FindModel extends Disposable {
148
148
if ( cell && cell . cellKind === CellKind . Markup ) {
149
149
const foundContentMatch = contentMatches . find ( m => m . cell . handle === cell . handle && m . contentMatches . length > 0 ) ;
150
150
const targetState = foundContentMatch ? CellEditState . Editing : CellEditState . Preview ;
151
- if ( cell . getEditState ( ) !== targetState ) {
151
+ const currentEditingState = cell . getEditState ( ) ;
152
+
153
+ if ( currentEditingState === CellEditState . Editing && cell . editStateSource !== 'find' ) {
154
+ // it's already in editing mode, we should not update
155
+ continue ;
156
+ }
157
+ if ( currentEditingState !== targetState ) {
152
158
cell . updateEditState ( targetState , 'find' ) ;
153
159
}
154
160
}
You can’t perform that action at this time.
0 commit comments