2023-01-22 01:15:23 +00:00
|
|
|
on.text_input = function(t)
|
|
|
|
print('text input', t)
|
2023-06-19 03:08:29 +01:00
|
|
|
if Cursor_node 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)
|
|
|
|
if not eq(Cursor_node.editor.screen_top1, old_top) then
|
|
|
|
Viewport.y = Cursor_node.y + y_of_schema1(Cursor_node.editor, Cursor_node.editor.screen_top1)
|
|
|
|
end
|
|
|
|
B(--[[preserve screen_top of cursor node]] true)
|
|
|
|
end
|
2023-10-16 00:03:43 +01:00
|
|
|
end
|