File tree Expand file tree Collapse file tree
apps/sim/app/workspace/[workspaceId]/files/components/file-viewer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -443,8 +443,7 @@ export const TextEditor = memo(function TextEditor({
443443 }
444444 }
445445 suppressScrollListenerRef . current = true
446- const prev = lastSyncedContentRef . current
447- if ( content . startsWith ( prev ) && prev . length < content . length ) {
446+ if ( content . startsWith ( monacoValue ) && monacoValue . length < content . length ) {
448447 const lastLine = model . getLineCount ( )
449448 const lastCol = model . getLineMaxColumn ( lastLine )
450449 model . applyEdits ( [
@@ -455,7 +454,7 @@ export const TextEditor = memo(function TextEditor({
455454 endLineNumber : lastLine ,
456455 endColumn : lastCol ,
457456 } ,
458- text : content . slice ( prev . length ) ,
457+ text : content . slice ( monacoValue . length ) ,
459458 } ,
460459 ] )
461460 } else {
You can’t perform that action at this time.
0 commit comments