MCPcopy
hub / github.com/1j01/jspaint / undo

Function undo

src/functions.js:2199–2213  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2197 }
2198}
2199function undo() {
2200 if (undos.length < 1) { return false; }
2201
2202 redos.push(current_history_node);
2203 let target_history_node = undos.pop();
2204
2205 while (target_history_node.soft && undos.length) {
2206 redos.push(target_history_node);
2207 target_history_node = undos.pop();
2208 }
2209
2210 go_to_history_node(target_history_node);
2211
2212 return true;
2213}
2214
2215// @TODO: use Clippy.js instead for potentially annoying tips
2216/** @type {OSGUI$Window} */

Callers 4

show_recovery_windowFunction · 0.90
menus.jsFile · 0.90
app.jsFile · 0.90

Calls 2

go_to_history_nodeFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected