mouse buttons are integers, not strings

[?]
Jun 14, 2022, 4:05 PM
DRFE3B3ZKRG4RY2R5Q3SDFD3LH4EXUX3CZCDFBNAXVI2SLDS57PAC

Dependencies

  • [2] Y2ZIPXEM new test
  • [3] 4VKEE43Z bugfix
  • [4] BLWAYPKV extract a module
  • [5] 2RXZ3PGO beginning of a new approach to scroll+wrap
  • [6] F3OOGMME switch freehand hotkey to eliminate conflict with search
  • [7] 7NQCCB34 .
  • [8] 252M2QMD forgot to move this special case out
  • [9] LXTTOB33 extract a couple of files
  • [10] JFFUF5AL override mouse state lookups in tests
  • [11] WAR3HXHT test both ways of selecting text with mouse
  • [12] PFT5Y2ZY move
  • [13] WTDKUACN rectangle and square shapes
  • [14] VCMS2CWT bugfix: escape key to hide online help
  • [15] XNFTJHC4 split keyboard handling between Text and Drawing
  • [16] LS55YKGW switch copy/paste to ctrl- hotkeys
  • [17] YCDYGEZU include drawing index in a few places
  • [18] G3C4FKPR bugfix: missed fixing a callsite
  • [19] TVM2WIHH bugfix: autosave and undo in a couple of cases
  • [20] IDG26SXK bugfix in commit e51ce12969
  • [21] DHI6IJCN selecting text and deleting selections
  • [22] 2MA33THZ few more transitions between shapes
  • [23] HOSPP2AN crisp font rendering
  • [24] JAXPXLEB set current_drawing_index with current_drawing
  • [25] H4K2GFIL experiment: give up on changing shape mode
  • [26] 7OUJM7DL one missing transition between shape modes
  • [27] WSXSEZQ2 switch circles to 'o' to avoid conflicting with copy
  • [28] ZLJGZYQG select text with shift + mouseclick
  • [29] SN2QONLI autosave on cut/paste
  • [30] BYG5CEMV support for naming points
  • [31] RMKMPFT5 fix a corner case when selecting text
  • [32] NQWWTGXR switch undo/redo to ctrl- hotkeys
  • [33] VHQCNMAR several more modules
  • [34] OIB2QPRC start remembering where the cursor is drawn in px
  • [35] Z4XRNDTR find text
  • [36] RT6EV6OP delegate update events to drawings
  • [37] 7SFHSB47 rename
  • [38] 65XHTZEK regression: couldn't do many drawing operations because line.y was reset
  • [39] 5FW7YOFT highlight selection while dragging
  • [40] 6UZ2JNZE yet another key conflict
  • [41] 3TCZ7ADH move
  • [42] 4QQBMWLL regression: typing uppercase letters in text
  • [43] 2ZYV7D3W handle tab characters
  • [44] LUNH47XX make text and drawings the same width
  • [*] BULPIBEG beginnings of a module for the text editor
  • [*] OTIBCAUJ love2d scaffold

Change contents

  • replacement in text_tests.lua at line 38
    [2.385][2.385:453]()
    App.run_after_mouse_click(screen_left_margin+8,Margin_top+5, '1')
    [2.385]
    [2.453]
    App.run_after_mouse_click(screen_left_margin+8,Margin_top+5, 1)
  • replacement in text_tests.lua at line 150
    [3.891][3.891:948]()
    App.run_after_mouse_click(App.screen.width-2,y-2, '1')
    [3.891]
    [3.948]
    App.run_after_mouse_click(App.screen.width-2,y-2, 1)
  • replacement in text_tests.lua at line 246
    [4.6031][4.2:72]()
    App.run_after_mouse_release(screen_left_margin+8,Margin_top+5, '1')
    [4.6031]
    [4.6100]
    App.run_after_mouse_release(screen_left_margin+8,Margin_top+5, 1)
  • replacement in text_tests.lua at line 265
    [4.40][4.73:141]()
    App.run_after_mouse_press(screen_left_margin+8,Margin_top+5, '1')
    [4.40]
    [4.107]
    App.run_after_mouse_press(screen_left_margin+8,Margin_top+5, 1)
  • replacement in text_tests.lua at line 267
    [4.144][4.142:225]()
    App.run_after_mouse_release(screen_left_margin+20,Margin_top+Line_height+5, '1')
    [4.144]
    [4.376]
    App.run_after_mouse_release(screen_left_margin+20,Margin_top+Line_height+5, 1)
  • replacement in text_tests.lua at line 286
    [4.610][4.226:364]()
    App.run_after_mouse_press(screen_left_margin+8,Margin_top+5, '1')
    App.run_after_mouse_release(screen_left_margin+8,Margin_top+5, '1')
    [4.610]
    [4.746]
    App.run_after_mouse_press(screen_left_margin+8,Margin_top+5, 1)
    App.run_after_mouse_release(screen_left_margin+8,Margin_top+5, 1)
  • replacement in text_tests.lua at line 290
    [4.396][4.396:548]()
    App.run_after_mouse_press(screen_left_margin+20,Margin_top+5, '1')
    App.run_after_mouse_release(screen_left_margin+20,Margin_top+Line_height+5, '1')
    [4.396]
    [4.548]
    App.run_after_mouse_press(screen_left_margin+20,Margin_top+5, 1)
    App.run_after_mouse_release(screen_left_margin+20,Margin_top+Line_height+5, 1)
  • replacement in text_tests.lua at line 311
    [4.475][4.582:720]()
    App.run_after_mouse_press(screen_left_margin+8,Margin_top+5, '1')
    App.run_after_mouse_release(screen_left_margin+8,Margin_top+5, '1')
    [4.475]
    [4.611]
    App.run_after_mouse_press(screen_left_margin+8,Margin_top+5, 1)
    App.run_after_mouse_release(screen_left_margin+8,Margin_top+5, 1)
  • replacement in text_tests.lua at line 315
    [4.752][4.752:904]()
    App.run_after_mouse_press(screen_left_margin+20,Margin_top+5, '1')
    App.run_after_mouse_release(screen_left_margin+20,Margin_top+Line_height+5, '1')
    [4.752]
    [4.838]
    App.run_after_mouse_press(screen_left_margin+20,Margin_top+5, 1)
    App.run_after_mouse_release(screen_left_margin+20,Margin_top+Line_height+5, 1)
  • replacement in text_tests.lua at line 319
    [4.936][4.936:1087]()
    App.run_after_mouse_press(screen_left_margin+20,Margin_top+5, '1')
    App.run_after_mouse_release(screen_left_margin+8,Margin_top+Line_height+5, '1')
    [4.936]
    [4.1087]
    App.run_after_mouse_press(screen_left_margin+20,Margin_top+5, 1)
    App.run_after_mouse_release(screen_left_margin+8,Margin_top+Line_height+5, 1)
  • replacement in text_tests.lua at line 958
    [4.33047][4.1121:1205]()
    App.run_after_mouse_release(screen_left_margin+8,Margin_top+Line_height*2+5, '1')
    [4.33047]
    [4.33130]
    App.run_after_mouse_release(screen_left_margin+8,Margin_top+Line_height*2+5, 1)
  • replacement in text.lua at line 141
    [4.28][4.1207:1248]()
    if App.mouse_down('1') then return end
    [4.28]
    [4.1]
    if App.mouse_down(1) then return end
  • replacement in select.lua at line 16
    [4.44671][4.1251:1281]()
    if App.mouse_down('1') then
    [4.44671]
    [4.44704]
    if App.mouse_down(1) then
  • replacement in main.lua at line 58
    [4.10940][4.1588:1718]()
    Old_cursor1, Old_selection1, Mousepress_shift = nil -- some extra state to compute selection between mousepress and mouserelease
    [4.10940]
    [4.1391]
    Old_cursor1, Old_selection1, Mousepress_shift = nil -- some extra state to compute selection between mouse press and release
  • replacement in main.lua at line 453
    [4.1992][4.1347:1407]()
    elseif App.mouse_down('1') or chord:sub(1,2) == 'C-' then
    [4.1992]
    [4.426]
    elseif App.mouse_down(1) or chord:sub(1,2) == 'C-' then
  • replacement in main.lua at line 462
    [4.233][4.1408:1464]()
    elseif chord == 'escape' and App.mouse_down('1') then
    [4.233]
    [4.8]
    elseif chord == 'escape' and App.mouse_down(1) then
  • replacement in main.lua at line 467
    [4.11][4.1465:1525]()
    elseif chord == 'escape' and not App.mouse_down('1') then
    [4.11]
    [4.74]
    elseif chord == 'escape' and not App.mouse_down(1) then
  • replacement in drawing.lua at line 18
    [4.598][4.1581:1643]()
    if App.mouse_down('1') and love.keyboard.isDown('h') then
    [4.598]
    [4.663]
    if App.mouse_down(1) and love.keyboard.isDown('h') then
  • replacement in drawing.lua at line 236
    [4.2333][4.2333:2363]()
    if App.mouse_down('1') then
    [4.2333]
    [4.339]
    if App.mouse_down(1) then
  • replacement in drawing.lua at line 352
    [4.5258][4.2572:2625]()
    if chord == 'C-p' and not App.mouse_down('1') then
    [4.5258]
    [4.5820]
    if chord == 'C-p' and not App.mouse_down(1) then
  • replacement in drawing.lua at line 354
    [4.5858][4.2626:2683]()
    elseif chord == 'C-g' and not App.mouse_down('1') then
    [4.5858]
    [4.5918]
    elseif chord == 'C-g' and not App.mouse_down(1) then
  • replacement in drawing.lua at line 356
    [4.5955][4.2684:2735]()
    elseif App.mouse_down('1') and chord == 'g' then
    [4.5955]
    [4.6009]
    elseif App.mouse_down(1) and chord == 'g' then
  • replacement in drawing.lua at line 371
    [4.6652][4.2736:2793]()
    elseif chord == 'C-r' and not App.mouse_down('1') then
    [4.6652]
    [4.6467]
    elseif chord == 'C-r' and not App.mouse_down(1) then
  • replacement in drawing.lua at line 373
    [4.6506][4.2794:2845]()
    elseif App.mouse_down('1') and chord == 'r' then
    [4.6506]
    [4.6560]
    elseif App.mouse_down(1) and chord == 'r' then
  • replacement in drawing.lua at line 388
    [4.7207][4.2846:2903]()
    elseif chord == 'C-s' and not App.mouse_down('1') then
    [4.7207]
    [4.7267]
    elseif chord == 'C-s' and not App.mouse_down(1) then
  • replacement in drawing.lua at line 390
    [4.7303][4.2904:2955]()
    elseif App.mouse_down('1') and chord == 's' then
    [4.7303]
    [4.7357]
    elseif App.mouse_down(1) and chord == 's' then
  • replacement in drawing.lua at line 409
    [4.7998][4.2956:3122]()
    elseif App.mouse_down('1') and chord == 'p' and (Current_drawing_mode == 'polygon' or Current_drawing_mode == 'rectangle' or Current_drawing_mode == 'square') then
    [4.7998]
    [4.163]
    elseif App.mouse_down(1) and chord == 'p' and (Current_drawing_mode == 'polygon' or Current_drawing_mode == 'rectangle' or Current_drawing_mode == 'square') then
  • replacement in drawing.lua at line 414
    [4.6992][4.3214:3271]()
    elseif chord == 'C-o' and not App.mouse_down('1') then
    [4.6992]
    [4.7052]
    elseif chord == 'C-o' and not App.mouse_down(1) then
  • replacement in drawing.lua at line 416
    [4.7088][4.3272:3360]()
    elseif App.mouse_down('1') and chord == 'a' and Current_drawing_mode == 'circle' then
    [4.7088]
    [4.212]
    elseif App.mouse_down(1) and chord == 'a' and Current_drawing_mode == 'circle' then
  • replacement in drawing.lua at line 424
    [4.7608][4.3452:3503]()
    elseif App.mouse_down('1') and chord == 'o' then
    [4.7608]
    [4.7662]
    elseif App.mouse_down(1) and chord == 'o' then
  • replacement in drawing.lua at line 435
    [4.8206][4.3504:3555]()
    elseif App.mouse_down('1') and chord == 'l' then
    [4.8206]
    [4.8260]
    elseif App.mouse_down(1) and chord == 'l' then
  • replacement in drawing.lua at line 446
    [4.8788][4.3556:3613]()
    elseif chord == 'C-l' and not App.mouse_down('1') then
    [4.8788]
    [4.8817]
    elseif chord == 'C-l' and not App.mouse_down(1) then
  • replacement in drawing.lua at line 448
    [4.8851][4.3614:3665]()
    elseif App.mouse_down('1') and chord == 'm' then
    [4.8851]
    [4.9028]
    elseif App.mouse_down(1) and chord == 'm' then
  • replacement in drawing.lua at line 461
    [4.9641][4.3666:3723]()
    elseif chord == 'C-m' and not App.mouse_down('1') then
    [4.9641]
    [4.9701]
    elseif chord == 'C-m' and not App.mouse_down(1) then
  • replacement in drawing.lua at line 463
    [4.9740][4.3724:3781]()
    elseif chord == 'C-s' and not App.mouse_down('1') then
    [4.9740]
    [4.9926]
    elseif chord == 'C-s' and not App.mouse_down(1) then
  • replacement in drawing.lua at line 468
    [4.10036][4.3782:3839]()
    elseif chord == 'C-u' and not App.mouse_down('1') then
    [4.10036]
    [4.16]
    elseif chord == 'C-u' and not App.mouse_down(1) then
  • replacement in drawing.lua at line 479
    [4.10365][4.3840:3891]()
    elseif App.mouse_down('1') and chord == 'v' then
    [4.10365]
    [4.138]
    elseif App.mouse_down(1) and chord == 'v' then
  • replacement in drawing.lua at line 490
    [4.1826][4.3892:3949]()
    elseif chord == 'C-n' and not App.mouse_down('1') then
    [4.1826]
    [4.260]
    elseif chord == 'C-n' and not App.mouse_down(1) then
  • replacement in drawing.lua at line 503
    [4.10688][4.3950:4007]()
    elseif chord == 'C-d' and not App.mouse_down('1') then
    [4.10688]
    [4.546]
    elseif chord == 'C-d' and not App.mouse_down(1) then
  • replacement in drawing.lua at line 526
    [4.11429][4.4008:4065]()
    elseif chord == 'C-h' and not App.mouse_down('1') then
    [4.11429]
    [4.11489]
    elseif chord == 'C-h' and not App.mouse_down(1) then