R5NILP5MSXYBOE6IHU4SZIOV4LWZEBFBGMFQL5WLX3QYPBXQDWZQC
GAD7OJC2Y6CZTLAQVQKJRB7HVBNFRF2PR3P64PSDBCNMLKMCC5TQC
S7CSVBHZ4AORIP4VIQETFAVXVMNKERVOI5DENNTU73ZO2L667N7QC
3XNFQDDNFGTN6ZFAB47AR6Q3663WLXDYC3K5TERYUWDM6U2FNOVAC
2L5MEZV344TOZLVY3432RHJFIRVXFD6O3GWLL5O4CV66BGAFTURQC
4HDOT2GEQA34NQ4ITYZRAWU7ND7RNMZTJQJRJLPXUCNFXG5U46NAC
R2ASHK5CEE3PTRLS37GP4PXJ7HIGJ6UD72KKBI57UDJI7VRROQGQC
function edit.put_cursor_on_next_text_line_wrapping_around_if_necessary(State)
local line = State.cursor1.line
local max = #State.lines
for _ = 1, max-1 do
line = (line+1) % max
if State.lines[line].mode == 'text' then
State.cursor1.line = line
State.cursor1.pos = 1
break
end
end
end
function edit.put_cursor_on_next_loc_wrapping_around_if_necessary(State)
local cursor_line = State.lines[State.cursor1.line].data
if State.cursor1.pos <= utf8.len(cursor_line) then
State.cursor1.pos = State.cursor1.pos + 1
else
edit.put_cursor_on_next_text_line_wrapping_around_if_necessary(State)
end