2VK5EL2HIOV7F5WVAOP7DMK2KZLD55FW2KFJY5LIKPN4LUULA73AC
MUJTM6REGQAK3LZTIFWGJRXE2UPCM4HSLXQYSF5ITLXLS6JCVPMQC
ELJNEPW26FUIIFY6D24274J7KZICRLE3TJHCFNRVLR5NZBNNV37AC
MXA3RZYKUI4UF2ISY7JEF6VKX6NOPZMZH5SLLCZHRJKFIXXXDPSAC
V3EABA35RWCOOU5OMIYRWXAKZOLHO4XPGTPOKY24RR2LOAD7ZQAQC
BULPIBEGL7TMK6CVIE7IS7WGAHGOSUJBGJSFQK542MOWGHP2ADQQC
Z5HLXU4PJWWJJDBCK52NBD6PIRIA3TAN2BKZB5HBYFGIDBX4F5HAC
ZHLO7K3MQNI6OMK6226SSO2Z6Z4ZXF4T73VOG36DVAG6CHR6OHWAC
ZPUQSPQPQFVRUIHGLAWW3IDBYODIWDHO62HAC3WWF5TM3CIJGHNQC
F65ADDGLR2PNXVSM2XBHM3OSLQC2OTRR3GQBI7DJWIKPJCJ5CSOAC
62PZGSUCEXJOCVWEOOENSDJITJFR27BGW7BPGFYVD3E5M6446RQQC
WLJCIXYMSTCNSYCFOEBQNDLBZ5D2Z3WTF4E4WYL5CFGIJ434FKNQC
KECEMMMRW2VVBZ567HJQPGLC57LTSBKWH7UFP32IW43D23X6WTEQC
-- skip some whitespace
-- we can cross the fold, so check side A/B one level down
Text.skip_whitespace_left(State)
Text.left(State)
Text.skip_non_whitespace_left(State)
end
function Text.word_right(State)
-- we can cross the fold, so check side A/B one level down
Text.skip_whitespace_right(State)
Text.right(State)
Text.skip_non_whitespace_right(State)
if Text.cursor_out_of_screen(State) then
Text.snap_cursor_to_bottom_of_screen(State)
end
end
function Text.skip_whitespace_left(State)
if State.cursor1.pos then
Text.skip_whitespace_leftA(State)
else
Text.skip_whitespace_leftB(State)
end
end
function Text.skip_non_whitespace_left(State)
if State.cursor1.pos then
Text.skip_non_whitespace_leftA(State)
else
Text.skip_non_whitespace_leftB(State)
end
end
function Text.skip_whitespace_leftA(State)
function Text.word_right(State)
-- skip some whitespace
function Text.skip_non_whitespace_leftB(State)
while true do
if State.cursor1.posB == 1 then
break
end
assert(State.cursor1.posB > 1)
if Text.match(State.lines[State.cursor1.line].dataB, State.cursor1.posB-1, '%s') then
break
end
Text.left(State)
end
end
function Text.skip_whitespace_right(State)
if State.cursor1.pos then
Text.skip_whitespace_rightA(State)
else
Text.skip_whitespace_rightB(State)
end
end
function Text.skip_non_whitespace_right(State)
if State.cursor1.pos then
Text.skip_non_whitespace_rightA(State)
else
Text.skip_non_whitespace_rightB(State)
end
end
function Text.skip_whitespace_rightA(State)
if Text.cursor_out_of_screen(State) then
Text.snap_cursor_to_bottom_of_screen(State)
end
function Text.skip_non_whitespace_rightB(State)
while true do
if State.cursor1.posB > utf8.len(State.lines[State.cursor1.line].dataB) then
break
end
if Text.match(State.lines[State.cursor1.line].dataB, State.cursor1.posB, '%s') then
break
end
Text.right_without_scroll(State)