Skip to content

Commit cb35b38

Browse files
committed
chore: set position before editing
1 parent 2c5958a commit cb35b38

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/features/MonakoEditor/MonacoEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ export const MonacoEditor = ({
278278

279279
// Update content without resetting cursor position
280280
model.pushEditOperations(
281-
[],
281+
editor.getSelections(),
282282
[{ range: model.getFullModelRange(), text: value }],
283283
() => null,
284284
);

0 commit comments

Comments
 (0)