mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 07:16:34 +00:00
feat(editor): add undo stack support for reset button
This commit is contained in:
parent
28a4b0631d
commit
e082aed9a1
@ -35,6 +35,7 @@ export default function ResetButton({
|
||||
const model = editor.getModel();
|
||||
if (model) {
|
||||
const fullRange = model.getFullModelRange();
|
||||
editor.pushUndoStop();
|
||||
editor.executeEdits("reset-code", [
|
||||
{
|
||||
range: fullRange,
|
||||
@ -42,6 +43,7 @@ export default function ResetButton({
|
||||
forceMoveMarkers: true,
|
||||
},
|
||||
]);
|
||||
editor.pushUndoStop();
|
||||
}
|
||||
}
|
||||
}}
|
||||
|
Loading…
Reference in New Issue
Block a user