extract a new variable

[?]
Jun 3, 2022, 6:40 AM
YPHKZVWM2FS7U3VNVDXFRJTBF4RLQ6K7ZWISLHOQJPYSKBELHFEAC

Dependencies

  • [2] OMTGHWMA yet another bugfix. But for how long?
  • [3] DHCLUDCW .
  • [4] HOSPP2AN crisp font rendering
  • [5] OTIBCAUJ love2d scaffold
  • [6] IMEJA43L snapshot
  • [7] DLQMM265 scroll past first page
  • [8] HMODUNJE scroll on backspace
  • [9] AD34IX2Z couple more tests
  • [10] QVDQMJXV avoid scrolling down if possible
  • [11] JF5L2BBS test harness now supports copy/paste
  • [12] TRNWIQN6 more precise height calculation when scrolling up as much as possible while keeping cursor on screen
  • [13] 6E3HVYWF test and App helper for mouse clicks
  • [14] XOAHJ6M3 similar tests for cursor up
  • [15] QYIFOHW3 first test!
  • [16] VJ3ODCHR assert for a bug I saw a while ago but can no longer reproduce
  • [17] 242L3OQX bugfix: ensure Cursor_line is always on a text line
  • [18] UWNHC4AA redo y computations
  • [19] YYUGIYFV .
  • [20] XX7G2FFJ intermingle freehand line drawings with text
  • [21] V5MJRFOZ bugfix: down arrow doesn't scroll up unnecessarily
  • [22] 3OKKTUT4 up and down arrow now moving by screen line where possible
  • [23] LERERVPH keep one screen line of overlap on pagedown
  • [24] 4RUI5X52 a few tests for pageup, and a bugfix
  • [25] WY3JD6W6 bugfix
  • [26] PHFWIFYK scroll on enter
  • [27] 2RXZ3PGO beginning of a new approach to scroll+wrap
  • [28] PR4KIAZD first stab at equally hacky cursor down support
  • [29] HYEAFRZ2 split mouse_pressed events between Text and Drawing
  • [30] R53OF3ON one bug I've repeatedly run into while testing with Moby Dick
  • [31] KOYAJWE4 extract a couple more methods
  • [32] A2NV3WVO scrolling with up arrow
  • [33] OYXDYPGS get rid of debug variables
  • [34] ESETRNLB bugfix: printing the first part of a line at the bottom made it seem non-wrapping
  • [35] YTSPVDZH first successful pagedown test, first bug found by test
  • [36] R5OKMVVC fix a regression in line wrapping
  • [37] DFSDPDO7 bugfix
  • [38] 73OCE2MC after much struggle, a brute-force undo
  • [39] 7IKRRESB longer names for indices in long loops
  • [40] U7M4M2F7 bugfix: don't rely on Screen_bottom1 while scrolling
  • [41] S5VCAFKY couple of tests for cursor down
  • [*] BULPIBEG beginnings of a module for the text editor
  • [*] YKRF5V3Z starting to load/save

Change contents

  • replacement in text.lua at line 301
    [5.344][5.344:386](),[5.422][5.422:452]()
    local screen_top_margin = 15 -- pixels
    local y = screen_top_margin
    [5.344]
    [5.452]
    local y = Margin_top
  • replacement in text.lua at line 318
    [5.297][5.297:339](),[5.375][5.375:405]()
    local screen_top_margin = 15 -- pixels
    local y = screen_top_margin
    [5.297]
    [5.405]
    local y = Margin_top
  • replacement in text.lua at line 335
    [5.306][5.306:348](),[5.384][5.384:414]()
    local screen_top_margin = 15 -- pixels
    local y = screen_top_margin
    [5.306]
    [5.414]
    local y = Margin_top
  • replacement in text.lua at line 353
    [5.1072][5.1072:1114](),[5.1150][5.1150:1180]()
    local screen_top_margin = 15 -- pixels
    local y = screen_top_margin
    [5.1072]
    [5.1180]
    local y = Margin_top
  • replacement in text.lua at line 375
    [5.1127][5.1127:1169](),[5.1205][5.1205:1235]()
    local screen_top_margin = 15 -- pixels
    local y = screen_top_margin
    [5.1127]
    [5.1235]
    local y = Margin_top
  • edit in text.lua at line 392
    [5.342][5.342:384]()
    local screen_top_margin = 15 -- pixels
  • replacement in text.lua at line 393
    [5.450][5.450:480]()
    local y = screen_top_margin
    [5.450]
    [5.480]
    local y = Margin_top
  • replacement in text.lua at line 404
    [5.1040][5.1040:1064]()
    y = screen_top_margin
    [5.1040]
    [5.1064]
    y = Margin_top
  • edit in text.lua at line 421
    [5.1650][5.1650:1692]()
    local screen_top_margin = 15 -- pixels
  • replacement in text.lua at line 422
    [5.1758][5.1758:1788]()
    local y = screen_top_margin
    [5.1758]
    [5.1788]
    local y = Margin_top
  • replacement in text.lua at line 434
    [5.2413][5.2413:2437]()
    y = screen_top_margin
    [5.2413]
    [5.2437]
    y = Margin_top
  • edit in text.lua at line 451
    [5.348][5.348:390]()
    local screen_top_margin = 15 -- pixels
  • replacement in text.lua at line 452
    [5.433][5.433:507]()
    App.run_after_mousepress(screen_left_margin+8,screen_top_margin+5, '1')
    [5.433]
    [5.507]
    App.run_after_mousepress(screen_left_margin+8,Margin_top+5, '1')
  • edit in text.lua at line 465
    [5.442][5.442:484]()
    local screen_top_margin = 15 -- pixels
  • replacement in text.lua at line 467
    [5.599][5.599:629]()
    local y = screen_top_margin
    [5.599]
    [5.629]
    local y = Margin_top
  • replacement in text.lua at line 475
    [5.451][5.876:900](),[5.876][5.876:900]()
    y = screen_top_margin
    [5.451]
    [5.900]
    y = Margin_top
  • edit in text.lua at line 494
    [5.1548][5.1548:1590]()
    local screen_top_margin = 15 -- pixels
  • replacement in text.lua at line 498
    [5.1735][5.1735:1765]()
    local y = screen_top_margin
    [5.1735]
    [5.171]
    local y = Margin_top
  • replacement in text.lua at line 505
    [5.299][5.1939:1980](),[5.659][5.1939:1980](),[5.681][5.1939:1980](),[5.1939][5.1939:1980]()
    y = screen_top_margin + drawing_height
    [5.659]
    [5.300]
    y = Margin_top + drawing_height
  • edit in text.lua at line 518
    [5.1089][5.1089:1131]()
    local screen_top_margin = 15 -- pixels
  • replacement in text.lua at line 519
    [5.1197][5.1197:1227]()
    local y = screen_top_margin
    [5.1197]
    [5.1227]
    local y = Margin_top
  • replacement in text.lua at line 531
    [5.2053][5.2053:2077]()
    y = screen_top_margin
    [5.2053]
    [5.2077]
    y = Margin_top
  • edit in text.lua at line 547
    [5.660][5.660:702]()
    local screen_top_margin = 15 -- pixels
  • replacement in text.lua at line 549
    [5.819][5.819:849]()
    local y = screen_top_margin
    [5.819]
    [5.849]
    local y = Margin_top
  • replacement in text.lua at line 560
    [5.938][5.1233:1257](),[5.1233][5.1233:1257]()
    y = screen_top_margin
    [5.938]
    [5.1257]
    y = Margin_top
  • edit in text.lua at line 577
    [5.2015][5.2015:2057]()
    local screen_top_margin = 15 -- pixels
  • replacement in text.lua at line 578
    [5.2123][5.2123:2153]()
    local y = screen_top_margin
    [5.2123]
    [5.2153]
    local y = Margin_top
  • replacement in text.lua at line 588
    [5.1146][5.2585:2609](),[5.2585][5.2585:2609]()
    y = screen_top_margin
    [5.1146]
    [5.2609]
    y = Margin_top
  • edit in text.lua at line 605
    [5.1560][5.1560:1602]()
    local screen_top_margin = 15 -- pixels
  • replacement in text.lua at line 606
    [5.1668][5.1668:1698]()
    local y = screen_top_margin
    [5.1668]
    [5.1698]
    local y = Margin_top
  • replacement in text.lua at line 617
    [5.2485][5.2485:2509]()
    y = screen_top_margin
    [5.2485]
    [5.2509]
    y = Margin_top
  • edit in text.lua at line 634
    [5.3311][5.3311:3353]()
    local screen_top_margin = 15 -- pixels
  • replacement in text.lua at line 635
    [5.3419][5.3419:3449]()
    local y = screen_top_margin
    [5.3419]
    [5.3449]
    local y = Margin_top
  • replacement in text.lua at line 646
    [5.4358][5.4358:4382]()
    y = screen_top_margin
    [5.4358]
    [5.4382]
    y = Margin_top
  • edit in text.lua at line 662
    [5.380][5.380:422]()
    local screen_top_margin = 15 -- pixels
  • replacement in text.lua at line 663
    [5.488][5.488:518]()
    local y = screen_top_margin
    [5.488]
    [5.518]
    local y = Margin_top
  • replacement in text.lua at line 679
    [5.1864][5.1864:1888]()
    y = screen_top_margin
    [5.1864]
    [5.1888]
    y = Margin_top
  • edit in text.lua at line 696
    [5.627][5.627:669]()
    local screen_top_margin = 15 -- pixels
  • replacement in text.lua at line 697
    [5.735][5.735:765]()
    local y = screen_top_margin
    [5.735]
    [5.765]
    local y = Margin_top
  • replacement in text.lua at line 708
    [5.5028][5.1139:1163](),[5.1139][5.1139:1163]()
    y = screen_top_margin
    [5.5028]
    [5.1163]
    y = Margin_top
  • edit in text.lua at line 725
    [5.1965][5.1965:2007]()
    local screen_top_margin = 15 -- pixels
  • replacement in text.lua at line 726
    [5.2073][5.2073:2103]()
    local y = screen_top_margin
    [5.2073]
    [5.2103]
    local y = Margin_top
  • replacement in text.lua at line 736
    [5.5195][5.2517:2541](),[5.2517][5.2517:2541]()
    y = screen_top_margin
    [5.5195]
    [5.2541]
    y = Margin_top
  • edit in text.lua at line 753
    [5.5580][5.5580:5622]()
    local screen_top_margin = 15 -- pixels
  • replacement in text.lua at line 754
    [5.5688][5.5688:5718]()
    local y = screen_top_margin
    [5.5688]
    [5.709]
    local y = Margin_top
  • replacement in text.lua at line 760
    [5.6153][5.6153:6177]()
    y = screen_top_margin
    [5.6153]
    [5.907]
    y = Margin_top
  • edit in text.lua at line 781
    [5.525][5.525:567]()
    local screen_top_margin = 15 -- pixels
  • replacement in text.lua at line 782
    [5.633][5.633:663]()
    local y = screen_top_margin
    [5.633]
    [5.663]
    local y = Margin_top
  • replacement in text.lua at line 790
    [5.1130][5.1130:1154]()
    y = screen_top_margin
    [5.1130]
    [5.1154]
    y = Margin_top
  • edit in text.lua at line 811
    [5.478][5.478:520]()
    local screen_top_margin = 15 -- pixels
  • replacement in text.lua at line 812
    [5.586][5.586:616]()
    local y = screen_top_margin
    [5.586]
    [5.57]
    local y = Margin_top
  • replacement in text.lua at line 822
    [5.509][5.1216:1240](),[5.1216][5.1216:1240]()
    y = screen_top_margin
    [5.509]
    [5.1240]
    y = Margin_top
  • edit in text.lua at line 838
    [5.259][5.259:301]()
    local screen_top_margin = 15 -- pixels
  • replacement in text.lua at line 840
    [5.415][5.415:445]()
    local y = screen_top_margin
    [5.415]
    [5.445]
    local y = Margin_top
  • replacement in text.lua at line 848
    [5.798][5.798:822]()
    y = screen_top_margin
    [5.798]
    [5.822]
    y = Margin_top
  • edit in text.lua at line 863
    [5.1356][5.1356:1398]()
    local screen_top_margin = 15 -- pixels
  • replacement in text.lua at line 864
    [5.1464][5.1464:1494]()
    local y = screen_top_margin
    [5.1464]
    [5.1494]
    local y = Margin_top
  • replacement in text.lua at line 875
    [5.2216][5.2216:2240]()
    y = screen_top_margin
    [5.2216]
    [5.2240]
    y = Margin_top
  • edit in text.lua at line 892
    [5.2955][5.2955:2997]()
    local screen_top_margin = 15 -- pixels
  • replacement in text.lua at line 893
    [5.3063][5.3063:3093]()
    local y = screen_top_margin
    [5.3063]
    [5.3093]
    local y = Margin_top
  • replacement in text.lua at line 902
    [5.3746][5.3746:3770]()
    y = screen_top_margin
    [5.3746]
    [5.3770]
    y = Margin_top
  • edit in text.lua at line 919
    [5.379][5.379:421]()
    local screen_top_margin = 15 -- pixels
  • replacement in text.lua at line 920
    [5.487][5.487:517]()
    local y = screen_top_margin
    [5.487]
    [5.517]
    local y = Margin_top
  • replacement in text.lua at line 931
    [5.1191][5.1191:1215]()
    y = screen_top_margin
    [5.1191]
    [5.1215]
    y = Margin_top
  • edit in text.lua at line 948
    [5.420][5.420:462]()
    local screen_top_margin = 15 -- pixels
  • replacement in text.lua at line 949
    [5.528][5.528:558]()
    local y = screen_top_margin
    [5.528]
    [5.558]
    local y = Margin_top
  • replacement in text.lua at line 956
    [5.1118][5.1118:1142]()
    y = screen_top_margin
    [5.1118]
    [5.1142]
    y = Margin_top
  • replacement in text.lua at line 972
    [5.405][5.405:447](),[5.483][5.483:513]()
    local screen_top_margin = 15 -- pixels
    local y = screen_top_margin
    [5.405]
    [5.513]
    local y = Margin_top
  • replacement in text.lua at line 984
    [5.1211][5.1211:1235]()
    y = screen_top_margin
    [5.1211]
    [5.1235]
    y = Margin_top
  • edit in text.lua at line 991
    [5.1707][5.1707:1749]()
    local screen_top_margin = 15 -- pixels
  • replacement in text.lua at line 992
    [5.1792][5.1792:1871]()
    App.run_after_mousepress(screen_left_margin+8,screen_top_margin+15*2+5, '1')
    [5.1792]
    [5.1871]
    App.run_after_mousepress(screen_left_margin+8,Margin_top+Line_height*2+5, '1')
  • edit in text.lua at line 1007
    [5.347][5.347:389]()
    local screen_top_margin = 15 -- pixels
  • replacement in text.lua at line 1008
    [5.455][5.455:485]()
    local y = screen_top_margin
    [5.455]
    [5.485]
    local y = Margin_top
  • replacement in text.lua at line 1018
    [5.1029][5.1029:1053]()
    y = screen_top_margin
    [5.1029]
    [5.1053]
    y = Margin_top
  • edit in text.lua at line 1035
    [5.1718][5.1718:1760]()
    local screen_top_margin = 15 -- pixels
  • replacement in text.lua at line 1036
    [5.1826][5.1826:1856]()
    local y = screen_top_margin
    [5.1826]
    [5.1856]
    local y = Margin_top
  • replacement in text.lua at line 1042
    [5.2176][5.2176:2200]()
    y = screen_top_margin
    [5.2176]
    [5.2200]
    y = Margin_top
  • replacement in text.lua at line 1164
    [5.3440][5.3440:3482](),[5.3518][5.3518:3548]()
    local screen_top_margin = 15 -- pixels
    local y = screen_top_margin
    [5.3440]
    [5.3548]
    local y = Margin_top
  • replacement in text.lua at line 1176
    [5.4143][5.4143:4167]()
    y = screen_top_margin
    [5.4143]
    [5.4167]
    y = Margin_top
  • replacement in text.lua at line 1198
    [5.5074][5.5074:5116](),[5.5152][5.5152:5182]()
    local screen_top_margin = 15 -- pixels
    local y = screen_top_margin
    [5.5074]
    [5.5182]
    local y = Margin_top
  • replacement in text.lua at line 1213
    [5.5984][5.5984:6008]()
    y = screen_top_margin
    [5.5984]
    [5.6008]
    y = Margin_top
  • replacement in text.lua at line 1573
    [4.3509][5.235:254](),[5.235][5.235:254]()
    while y >= 15 do
    [4.3509]
    [5.254]
    while y >= Margin_top do
  • replacement in text.lua at line 1786
    [5.87][5.682:712]()
    local y = 15 -- top margin
    [5.87]
    [5.6682]
    local y = Margin_top
  • replacement in text.lua at line 1818
    [4.3722][5.500:545](),[5.500][5.500:545]()
    if y - h < 15 then -- top margin = 15
    [4.3722]
    [5.545]
    if y - h < Margin_top then
  • replacement in text.lua at line 1828
    [2.59][5.832:857](),[5.832][5.832:857]()
    if y - h < 15 then
    [2.59]
    [5.857]
    if y - h < Margin_top then
  • edit in main.lua at line 66
    [4.4161]
    [44.3]
    Margin_top = 15
  • replacement in main.lua at line 139
    [3.46][5.3:18](),[5.119][5.3:18](),[5.545][5.3:18]()
    local y = 15
    [3.46]
    [5.58]
    local y = Margin_top