B:BD[
2.171] → [
2.171:750]
editor.screen_top1 = {line=Editors[e-1].screen_bottom1.line, pos=Editors[e-1].screen_bottom1.pos}
-- scroll down one line
Text.populate_screen_line_starting_pos(editor, editor.screen_top1.line)
local _, screen_line_index = Text.pos_at_start_of_screen_line(editor, editor.screen_top1)
if screen_line_index < #editor.line_cache[editor.screen_top1.line].screen_line_starting_pos then
editor.screen_top1.pos = editor.line_cache[editor.screen_top1.line].screen_line_starting_pos[screen_line_index+1]
else
editor.screen_top1 = {line=editor.screen_top1.line+1, pos=1}
if Editors[e-1].screen_bottom1.line then
-- there's something left to draw on this column
editor.screen_top1 = {line=Editors[e-1].screen_bottom1.line, pos=Editors[e-1].screen_bottom1.pos}
-- scroll down one line
Text.populate_screen_line_starting_pos(editor, editor.screen_top1.line)
local _, screen_line_index = Text.pos_at_start_of_screen_line(editor, editor.screen_top1)
if screen_line_index < #editor.line_cache[editor.screen_top1.line].screen_line_starting_pos then
editor.screen_top1.pos = editor.line_cache[editor.screen_top1.line].screen_line_starting_pos[screen_line_index+1]
else
editor.screen_top1 = {line=editor.screen_top1.line+1, pos=1}
end
edit.draw(Editors[e], Text_color) -- initialize screen_bottom1