diff options
author | Eric <ericmabr@gmail.com> | 2023-08-13 16:08:28 -0400 |
---|---|---|
committer | Eric <ericmabr@gmail.com> | 2023-08-13 16:08:28 -0400 |
commit | 0020ec69b847c8607affb57babddfddc812dc9b6 (patch) | |
tree | e24255039015745d2073806bee97ce449ddb5260 /src/client/views/ScriptingRepl.tsx | |
parent | 7b2553514bb000eb7f618eb0f0d653baee78742c (diff) | |
parent | 3b45f1d30a947dc1702ec347b83e98374c5b603c (diff) |
Merge branch 'master' into UI_Update_Eric_Ma
Diffstat (limited to 'src/client/views/ScriptingRepl.tsx')
-rw-r--r-- | src/client/views/ScriptingRepl.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/ScriptingRepl.tsx b/src/client/views/ScriptingRepl.tsx index 5dfe10def..2bc2d5e6b 100644 --- a/src/client/views/ScriptingRepl.tsx +++ b/src/client/views/ScriptingRepl.tsx @@ -5,6 +5,7 @@ import * as React from 'react'; import { DocumentManager } from '../util/DocumentManager'; import { CompileScript, Transformer, ts } from '../util/Scripting'; import { ScriptingGlobals } from '../util/ScriptingGlobals'; +import { undoable } from '../util/UndoManager'; import { DocumentIconContainer } from './nodes/DocumentIcon'; import { OverlayView } from './OverlayView'; import './ScriptingRepl.scss'; @@ -161,7 +162,7 @@ export class ScriptingRepl extends React.Component { this.commands.push({ command: this.commandString, result: script.errors }); return; } - const result = script.run({ args: this.args }, e => this.commands.push({ command: this.commandString, result: e.toString() })); + const result = undoable(() => script.run({ args: this.args }, e => this.commands.push({ command: this.commandString, result: e.toString() })), 'run:' + this.commandString)(); if (result.success) { this.commands.push({ command: this.commandString, result: result.result }); this.commandsHistory.push(this.commandString); |