feat: push undo state to undo stack when import string

This commit is contained in:
Minhyeok Park 2024-10-15 18:47:27 +09:00
parent 116d4173aa
commit 11c6d1735e
Signed by: pmh_only
SSH Key Fingerprint: SHA256:g/OyGvi2pcd8ub9mqge/ohmDP0fZX/xOPWPIcM+9XpI

View File

@ -151,9 +151,10 @@
window.btn = (id) => { window.btn = (id) => {
const text = document.getElementById(id).value const text = document.getElementById(id).value
editor.executeEdits('ptools', [{ identifier: 'delete', range: new monaco.Range(1, 1, 1000000000, 1), text: '', forceMoveMarkers: true }]); editor.executeEdits('ptools', [{ identifier: 'delete', range: new monaco.Range(1, 1, 1000000000, 1), text: '', forceMoveMarkers: true }]);
editor.executeEdits('ptools', [{ identifier: 'insert', range: new monaco.Range(1, 1, 1, 1), text, forceMoveMarkers: true }]); editor.executeEdits('ptools', [{ identifier: 'insert', range: new monaco.Range(1, 1, 1, 1), text, forceMoveMarkers: true }]);
editor.pushUndoStop()
} }
try { try {