-- move
if chord == 'up' then
if State.screen_top1.line > 1 then
State.screen_top1.line = State.screen_top1.line-1
end
elseif chord == 'down' then
if State.screen_top1.line < #State.lines then
State.screen_top1.line = State.screen_top1.line+1
end
elseif chord == 'pageup' then
local y = 0
while State.screen_top1.line > 1 and y < App.screen.height - 100 do
State.screen_top1.line = State.screen_top1.line - 1
y = y + tenonauger.height(State, State.screen_top1.line)
end
elseif chord == 'pagedown' then
local y = 0
while State.screen_top1.line < #State.lines and y < App.screen.height - 100 do
y = y + tenonauger.height(State, State.screen_top1.line)
State.screen_top1.line = State.screen_top1.line + 1
end
end