pothi.love/0022-on.text_input

13 lines
462 B
Plaintext

on.text_input = function(t)
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
Viewport.y = Cursor_node.y + y_of_schema1(Cursor_node.editor, Cursor_node.editor.screen_top1)
A(--[[skip updating screen_top for]] Cursor_node)
return
end
A()
end
end