diff --git a/ivette/src/renderer/Controller.tsx b/ivette/src/renderer/Controller.tsx index 01d73e3cb1486b920d9fbd9e812189eac70cbe75..699fa98dc8a2018dc87afac4848253179e67aaad 100644 --- a/ivette/src/renderer/Controller.tsx +++ b/ivette/src/renderer/Controller.tsx @@ -169,17 +169,10 @@ const editor = new RichTextBuffer(); const RenderConsole = () => { const scratch = React.useRef([] as string[]); const [cursor, setCursor] = React.useState(-1); - const [H0, setH0] = Dome.useState('Controller.history', []); + const [history, setHistory] = Dome.useState('Controller.history', []); const [isEmpty, setEmpty] = React.useState(true); const [noTrash, setNoTrash] = React.useState(true); - // Cope with merge settings that keeps previous array entries (BUG in DOME) - const history = Array.isArray(H0) ? H0.filter((h) => h !== '') : []; - const setHistory = (hs: string[]) => { - const n = hs.length; - setH0(n < 50 ? hs.concat(Array(50 - n).fill('')) : hs); - }; - Dome.useEmitter(editor, 'change', () => { const cmd = editor.getValue().trim(); setEmpty(cmd === '');