App.color(Text_color)
assert(#State.lines == #State.line_cache)
local y = State.top
for line_index = State.screen_top1.line,#State.lines do
local line = State.lines[line_index]
if y + State.line_height > App.screen.height then break end
State.screen_bottom1 = {line=line_index, pos=nil, posB=nil}
local startpos, startposB = 1, nil
if line_index == State.screen_top1.line then
if State.screen_top1.pos then
startpos = State.screen_top1.pos
else
startpos, startposB = nil, State.screen_top1.posB
end
end
y, State.screen_bottom1.pos, State.screen_bottom1.posB = Text.draw(State, line_index, y, startpos, startposB)
y = y + State.line_height
end