selection bugfix

[?]
Jun 20, 2022, 7:02 PM
4WAFGF4ZMUQOLBWRZ2SI6RWEBKMFNFZQJMPECT25C2VPYHNDK2JQC

Dependencies

  • [2] AVLAYODP much simpler
  • [3] HRWN5V6J Devine's suggestion to try to live with just freehand
  • [4] XNFTJHC4 split keyboard handling between Text and Drawing
  • [*] LXTTOB33 extract a couple of files
  • [*] VG75U7IM bugfix: typing should delete highlighted text
  • [*] OTIBCAUJ love2d scaffold

Change contents

  • edit in text_tests.lua at line 244
    [7.520]
    [7.520]
    end
    function test_copy_does_not_reset_selection()
    io.write('\ntest_copy_does_not_reset_selection')
    -- display a line of text with a selection
    App.screen.init{width=80, height=80}
    Lines = load_array{'abc'}
    Line_width = 75
    Cursor1 = {line=1, pos=1}
    Selection1 = {line=1, pos=2}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    App.draw()
    -- copy selection
    App.run_after_keychord('C-c')
    check_eq(App.clipboard, 'a', 'F - test_copy_does_not_reset_selection/clipboard')
    -- selection is reset since shift key is not pressed
    check(Selection1.line, 'F - test_copy_does_not_reset_selection')
  • replacement in main.lua at line 554
    [2.242][2.242:273]()
    if not App.shift_down() then
    [2.242]
    [2.273]
    if not App.shift_down() and chord ~= 'C-c' then