(text: string)
| 51 | |
| 52 | /** Sets text AND clears Monaco's undo stack so Cmd+Z can't independently undo just text. */ |
| 53 | export function setEditorValueAndClearUndo(text: string) { |
| 54 | const editor = useEditorStore.getState().editor; |
| 55 | if (!editor) return; |
| 56 | const model = editor.getModel(); |
| 57 | if (!model) return; |
| 58 | _isInternalWrite = true; |
| 59 | model.setValue(text); |
| 60 | _isInternalWrite = false; |
| 61 | } |
| 62 | |
| 63 | export function updateModelMarkers() { |
| 64 | const { monaco, editor, markers } = useEditorStore.getState(); |
no outgoing calls
no test coverage detected