2LC3BM2NCIR76UILI5D4DVC5KYJSBVHDNMOC5G3TOJNCRLX6PZEQC MP2TBKU6CNDMZKENYMBV62F5KQ27ZWEVPVRFS2RESVDQQT2IRR4AC NUZFHX6IUV2KXZOIJQTD5VIU7ELDQCFPDXYBUNQGWLKH3OMYND5QC LXTTOB33N2HCUZFIUDRQGGBVHK2HODRG4NBLH6RXRQZDCHF27BSAC ZPUQSPQPQFVRUIHGLAWW3IDBYODIWDHO62HAC3WWF5TM3CIJGHNQC BULPIBEGL7TMK6CVIE7IS7WGAHGOSUJBGJSFQK542MOWGHP2ADQQC DHI6IJCNSTHGED67T6H5X6Y636C7PIDGIJD32HBEKLT5WIMRS5MAC KECEMMMRW2VVBZ567HJQPGLC57LTSBKWH7UFP32IW43D23X6WTEQC endfunction test_skip_past_tab_to_previous_word()io.write('\ntest_skip_past_tab_to_previous_word')App.screen.init{width=120, height=60}Lines = load_array{'abc def\tghi'}Cursor1 = {line=1, pos=10} -- within third wordMargin_right = 0; Margin_width = Margin_leftApp.draw()App.run_after_keychord('M-left')check_eq(Cursor1.pos, 9, 'F - test_skip_past_tab_to_previous_word')
function test_skip_past_tab_to_next_word()io.write('\ntest_skip_past_tab_to_next_word')App.screen.init{width=120, height=60}Lines = load_array{'abc\tdef'}Cursor1 = {line=1, pos=1} -- at the space between wordsMargin_right = 0; Margin_width = Margin_leftApp.draw()App.run_after_keychord('M-right')check_eq(Cursor1.pos, 4, 'F - test_skip_past_tab_to_next_word')end
local offset = Text.offset(Lines[Cursor1.line].data, Cursor1.pos)assert(offset > 1)if Lines[Cursor1.line].data:sub(offset-1,offset-1) == ' ' then
if Text.match(Lines[Cursor1.line].data, Cursor1.pos-1, '%s') then
local offset = Text.offset(Lines[Cursor1.line].data, Cursor1.pos)if Lines[Cursor1.line].data:sub(offset,offset) == ' ' then -- TODO: other space characters
if Text.match(Lines[Cursor1.line].data, Cursor1.pos, '%s') then