From fbf406dccd6a735ff26cea6dd8e9c7dc2601af44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Sun, 23 Aug 2026 21:43:46 +0200 Subject: [PATCH] fix small issue --- client/homebrew/editor/editor.jsx | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index cf8b46fcd..eac31f320 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -355,14 +355,23 @@ const Editor = forwardRef( ); } }; + const redo = ()=>codeEditor.current?.redo(); + const historySize = ()=>codeEditor.current?.historySize(); + const undo = ()=>codeEditor.current?.undo(); + const foldCode = ()=>codeEditor.current?.foldAll(); + const unfoldCode = ()=>codeEditor.current?.unfoldAll(); + + const update = ()=>{}; + useImperativeHandle(ref, ()=>({ - update : ()=>{}, - undo : ()=>codeEditor.current?.undo(), - redo : ()=>codeEditor.current?.redo(), - foldCode : ()=>codeEditor.current?.foldAll(), - unfoldCode : ()=>codeEditor.current?.unfoldAll(), - historySize : ()=>codeEditor.current?.historySize(), + update, + undo, + redo, + foldCode, + unfoldCode, + historySize, })); + return (