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text.pos_at_start_of_cursor_screen_line(left, right)
local screen_line_index,screen_line_starting_pos = Text.pos_at_start_of_cursor_screen_line(State, left, right)
function Text.pos_at_start_of_cursor_screen_line(left, right)
Text.populate_screen_line_starting_pos(Editor_state.lines[Editor_state.cursor1.line], left, right)
for i=#Editor_state.lines[Editor_state.cursor1.line].screen_line_starting_pos,1,-1 do
local spos = Editor_state.lines[Editor_state.cursor1.line].screen_line_starting_pos[i]
if spos <= Editor_state.cursor1.pos then
function Text.pos_at_start_of_cursor_screen_line(State, left, right)
Text.populate_screen_line_starting_pos(State.lines[State.cursor1.line], left, right)
for i=#State.lines[State.cursor1.line].screen_line_starting_pos,1,-1 do
local spos = State.lines[State.cursor1.line].screen_line_starting_pos[i]
if spos <= State.cursor1.pos then
--? local _,botpos = Text.pos_at_start_of_cursor_screen_line(left, right)
--? local botline1 = {line=Editor_state.cursor1.line, pos=botpos}
--? return Text.lt1(Editor_state.screen_bottom1, botline1)
--? local _,botpos = Text.pos_at_start_of_cursor_screen_line(State, left, right)
--? local botline1 = {line=State.cursor1.line, pos=botpos}
--? return Text.lt1(State.screen_bottom1, botline1)
if Text.cursor_past_screen_bottom() then
Text.snap_cursor_to_bottom_of_screen(State.margin_left, App.screen.height-State.margin_right)
if Text.cursor_past_screen_bottom(State) then
Text.snap_cursor_to_bottom_of_screen(State, State.margin_left, App.screen.height-State.margin_right)