diff --git a/0022-on.text_input b/0022-on.text_input index aa9ca81..8645c1c 100644 --- a/0022-on.text_input +++ b/0022-on.text_input @@ -1,5 +1,5 @@ on.text_input = function(t) - if Cursor_node then + if Cursor_node and Cursor_node.editor.cursor_x then local old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos} edit.text_input(Cursor_node.editor, t) if not eq(Cursor_node.editor.screen_top1, old_top) then diff --git a/0023-on.keychord_press b/0023-on.keychord_press index 0d80349..1d8d944 100644 --- a/0023-on.keychord_press +++ b/0023-on.keychord_press @@ -14,7 +14,7 @@ on.keychord_press = function(chord, key) -- reset zoom Viewport.zoom = 1.0 B() - elseif Cursor_node then + elseif Cursor_node and Cursor_node.editor.cursor_x then local old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos} edit.keychord_press(Cursor_node.editor, chord, key) if not eq(Cursor_node.editor.screen_top1, old_top) then