It's still a bit simple-minded. Most software will keep the first bound fixed and move the second. Lines currently has the bounds in a queue of sorts. But I have a test to indicate the behavior that is definitely desired. We'll see if we need it to get more complex.
ZLJGZYQGQ2S4UFWTVF4PQDSGMP6A4IS4GDHCMBAAA5SK2N2NWR3QC LXTTOB33N2HCUZFIUDRQGGBVHK2HODRG4NBLH6RXRQZDCHF27BSAC HYEAFRZ2UEKDYTAE2GDQLHEJBPQASP2NDLMXB7F6MTVK2BKOXKEAC 5FW7YOFTLKHRND6IOR4HG4X3C5BO2WV5KTEUW3PPKCRU5L5GXKXQC OTIBCAUJ3KDQJLVDN3A536DLZGNRYMGJLORZVR3WLCGXGO6UGO6AC 2ENZW7TVCS47BWCA4AIEVGKGMT4Y2TSM5IJ7O5K2VSWNXIN3SG4QC BOFNXP5GZDCUMQG3LQVTSSFEQP7REQ4RIRJLDLETFSAGFTVDVEKAC 2INHXC3KRJVZTX2BQ63ZQLHIC5SWPUG4PQKCMLC7SQKN5R7LJZ6QC G6OYAYHUSMSPKLRW52LQDAF4NBHFPWY3GZAHZZDLJY2ZL6NLTNEQC 6LJZN727CRPYR34LV75CQF55YZI3E7MGESYZSFSYAE73SNEZE3FAC 4QQBMWLLIA42YP6FBFC445ABQH62RRJBL5KKILTERJALPOJCYK4QC ETM7ENJRMQ3PFPGIKTEDCOTFW7LBOLE2YGIJCWSZB67ENAZGEHZQC 3HDWCPDIQ2R7N63GQIABVE5L63U42CLKNLVJQFKBOZH4BMJQA5XAC JF5L2BBS7ESMKHNGKLXI2F32GZKET2ICJ4KT2L5BMH3P2L2Y5MRAC 3QNOKBFMKBGXBVJIRHR2444JRRMBTABHE4674NR3DT67RRM2X6GAC AD34IX2ZSGYGU3LGY2IZOZNKD4HRQOYJVG5UWMWLXJZJSM62FFOAC AVTNUQYRBW7IX2YQ3KDLVQ23RGW3BAKTAE7P73ASBYNKOHMQMH5AC check_nil(Selection1.line, 'F - test_move_cursor_using_mouse/selection:line')check_nil(Selection1.pos, 'F - test_move_cursor_using_mouse/selection:pos')endfunction test_select_text_using_mouse()io.write('\ntest_select_text_using_mouse')App.screen.init{width=50, height=60}Lines = load_array{'abc', 'def', 'xyz'}Line_width = App.screen.widthCursor1 = {line=1, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Selection1 = {}App.draw() -- populate line.y for each line in Lineslocal screen_left_margin = 25 -- pixels-- click on first locationApp.run_after_mousepress(screen_left_margin+8,Margin_top+5, '1')App.run_after_mouserelease(screen_left_margin+8,Margin_top+5, '1')-- hold down shift and click somewhere elseApp.keypress('lshift')App.run_after_mousepress(screen_left_margin+20,Margin_top+5, '1')App.run_after_mouserelease(screen_left_margin+20,Margin_top+Line_height+5, '1')App.keyrelease('lshift')check_eq(Cursor1.line, 2, 'F - test_select_text_using_mouse/cursor:line')check_eq(Cursor1.pos, 4, 'F - test_select_text_using_mouse/cursor:pos')check_eq(Selection1.line, 1, 'F - test_select_text_using_mouse/selection:line')check_eq(Selection1.pos, 2, 'F - test_select_text_using_mouse/selection:pos')