2023-01-22 01:15:23 +00:00
|
|
|
on.text_input = function(t)
|
|
|
|
print('text input', t)
|
2023-10-28 09:26:13 +01:00
|
|
|
if Cursor_node and Cursor_node.editor.cursor_x then
|
2023-01-22 01:15:23 +00:00
|
|
|
local old_top = {line=Cursor_node.editor.screen_top1.line, pos=Cursor_node.editor.screen_top1.pos}
|
|
|
|
edit.text_input(Cursor_node.editor, t)
|
2023-10-28 07:01:46 +01:00
|
|
|
pan_viewport_to_contain_cursor(Cursor_node)
|
2023-10-28 09:21:50 +01:00
|
|
|
if eq(Cursor_node.editor.screen_top1, old_top) then
|
|
|
|
B()
|
|
|
|
else
|
|
|
|
A()
|
2023-01-22 01:15:23 +00:00
|
|
|
end
|
|
|
|
end
|
2023-10-16 00:03:43 +01:00
|
|
|
end
|