move useHotkey for undo/redo into App

This commit is contained in:
Andrew Varga
2025-06-13 15:56:18 +02:00
parent 939c2c77b0
commit af8d1330fd
2 changed files with 11 additions and 11 deletions

View File

@ -75,17 +75,6 @@ export const KclEditorPane = () => {
: context.app.theme.current
const { copilotLSP, kclLSP } = useLspContext()
// Since these already exist in the editor, we don't need to define them
// with the wrapper.
useHotkeys('mod+z', (e) => {
e.preventDefault()
editorManager.undo()
})
useHotkeys('mod+shift+z', (e) => {
e.preventDefault()
editorManager.redo()
})
// When this component unmounts, we need to tell the machine that the editor
useEffect(() => {
return () => {