if App.any_modifier_down() then
if App.key_down(t) then
-- The modifiers didn't change the key. Handle it in keychord_pressed.
return
else
-- Key mutated by the keyboard layout. Continue below.
end
end
local before = snapshot(State, State.cursor1.line)
--? print(State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos, State.screen_bottom1.line, State.screen_bottom1.pos)
Text.insert_at_cursor(State, t)
if State.cursor_y > App.screen.height - State.line_height then
Text.populate_screen_line_starting_pos(State, State.cursor1.line)
Text.snap_cursor_to_bottom_of_screen(State, State.left, State.right)
end
record_undo_event(State, {before=before, after=snapshot(State, State.cursor1.line)})
end
function Text.insert_at_cursor(State, t)