MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / updateHistoryButtons

Function updateHistoryButtons

src/handlers/quickToolsInit.js:396–402  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

394}
395
396function updateHistoryButtons() {
397 const { editor, activeFile } = editorManager;
398 const disabled = !editor || activeFile?.type !== "editor";
399
400 updateHistoryButton("undo", disabled || undoDepth(editor.state) === 0);
401 updateHistoryButton("redo", disabled || redoDepth(editor.state) === 0);
402}
403
404function updateHistoryButton(id, disabled) {
405 const buttons = new Set();

Callers 1

updateQuickToolsStateFunction · 0.85

Calls 1

updateHistoryButtonFunction · 0.85

Tested by

no test coverage detected