Merge upstream into main

[?]
Jul 1, 2022, 6:46 PM
OEUU62GMV5NDJTICRKJSGKG3TO5DJIPY6CQZNNP53MK737X3KG6QC

Dependencies

  • [2] IPW5MN2Q Merge upstream into main
  • [3] PNGWLAFN Merge upstream into main
  • [4] VUVH2XLF Merge upstream into main
  • [5] XI5OALQX some redundant calls
  • [6] YIQYNVD2 rip out the line-width slider
  • [7] 7M7LS7I2 start saving some settings to disk on quit
  • [8] YGCT2D2O start loading settings as applicable
  • [9] 5DOTWNVM right margin
  • [10] WOXIYUTL bugfix: manage screen_top and cursor when resizing
  • [11] NZ7V4BVS note card
  • [12] 7M5PGWKU drop last couple of manual tests
  • [13] HJ3PM2VT .
  • [14] YW2GO3U4 bugfix: crash in Text.up() after return
  • [15] IWYLK45K clicking to the right of a line within line width
  • [16] OTIBCAUJ love2d scaffold
  • [17] ZNLTRNNK highlight another global
  • [18] CCYSVZA2 bugfix: BSOD in #4.
  • [19] RMKMPFT5 fix a corner case when selecting text
  • [20] FYS7TCDW bugfix
  • [21] MYC7XR5Q bugfix: lines that aren't drawn from the start
  • [22] EQP53UQV autosave slightly less aggressively
  • [23] J5IEBT64 enforce press/release state only processed once
  • [24] HYEAFRZ2 split mouse_pressed events between Text and Drawing
  • [25] EDY3RQUL gracefully handle a non-existent filename at the commandline
  • [26] EMHRPJ3R no, that's not right
  • [27] M6TH7VSZ rip out notion of Line_width
  • [28] QU7NHFOV show cursor
  • [29] 7XKWT5Y5 correct location of the line width slider
  • [30] K464QQR4 more defensive resize handling
  • [31] W7JMT5V2 rip out most support for polygons
  • [32] 23DEB6JL make sure to save right when quitting
  • [33] RF5ALVNY allow the window to be resized
  • [34] 7IKRRESB longer names for indices in long loops
  • [35] HOSPP2AN crisp font rendering
  • [36] NFCBIEZD affordance to adjust width for word wrap
  • [37] AVQ5MC5D finish uppercasing all globals
  • [38] 4VKEE43Z bugfix
  • [39] PX7DDEMO autosave slightly less aggressively
  • [40] DDXXXXBR new mode for polygons
  • [41] 27DROQW2 Merge upstream into main
  • [42] OYXDYPGS get rid of debug variables
  • [43] DHCLUDCW .
  • [44] HDC3AAQP silly reason my screenshots had an ugly black line down the left
  • [45] KVHUFUFV reorg
  • [46] MGOQ5XAV start uppercasing globals
  • [47] VIU2FBNV make sure to save right when quitting
  • [48] AM42E4Y6 avoid redundant writes on exit
  • [49] CPZGQT72 go through and fix similar issues
  • [50] 42LVB4DE test: naming a point
  • [51] DGK5BPVI bugfix: UTF-8 in compute_fragments
  • [52] KAUD3YIK tests: deleting points/shapes
  • [53] BATTU6HW stop blanking screen while resizing
  • [54] 4NDYV4WD fix 2 bugs in line selection
  • [55] CZB4CK2R bugfix
  • [56] IRV65LZP fold variables for screen dimensions into the app framework
  • [57] 6J3NXBYG affordance to adjust width for word wrap
  • [58] 2C7CTIQY make space for multiple kinds of width
  • [59] DLQMM265 scroll past first page
  • [60] OAHNWDYG .
  • [61] U76D4P36 fix a typo
  • [62] 2INHXC3K position cursor by clicking on text
  • [63] AD34IX2Z couple more tests
  • [64] AVTNUQYR basic test-enabled framework
  • [65] 5FW7YOFT highlight selection while dragging
  • [66] MP2TBKU6 bugfix: crash in Text.up() after return
  • [67] XX7G2FFJ intermingle freehand line drawings with text
  • [68] WDMPH4AN drop support for squares
  • [69] CRYGI3LR more drawing tests
  • [70] ZUOL7X6V move
  • [71] 73OCE2MC after much struggle, a brute-force undo
  • [72] OWK3U6VD tests for drawing polygons
  • [73] BOFNXP5G clicking now moves the cursor even on long, wrapped lines
  • [74] 5L7K4GBD clicking to the right of a wrapped line
  • [75] J2SVGR2E experiment: blinking cursor
  • [*] LXTTOB33 extract a couple of files
  • [*] BULPIBEG beginnings of a module for the text editor
  • [*] JRLBUB6L more intuitive point delete from polygons
  • [*] K2X6G75Z start writing some tests for drawings
  • [*] 7DYUAOI6 test: undo moving point

Change contents

  • edit in text_tests.lua at line 263
    [11.208][11.208:248](),[11.208][11.208:248]()
    App.screen.init{width=200, height=80}
  • resurrect zombie in text_tests.lua at line 264
    [11.202][11.248:404](),[11.248][11.248:404](),[11.248][11.248:404]()
    -- 0 1 2
    -- 123456789012345678901
    Lines = load_array{'the quick brown fox jumped over the lazy dog'}
  • edit in text_tests.lua at line 267
    [11.404][11.404:423](),[11.404][11.404:423]()
    Line_width = 160
  • resurrect zombie in text_tests.lua at line 267
    [11.404][9.722:769](),[11.404][9.722:769]()
    Margin_right = 0; Margin_width = Margin_left
  • resurrect zombie in text_tests.lua at line 268
    [9.769][11.423:676](),[11.423][11.423:676](),[11.423][11.423:676]()
    Cursor1 = {line=1, pos=1}
    Screen_top1 = {line=1, pos=1}
    Screen_bottom1 = {}
    App.draw()
    local y = Margin_top
    App.screen.check(y, 'the quick brown fox ', 'F - test_click_past_end_of_word_wrapping_line/baseline/screen:1')
    y = y + Line_height
  • edit in text_tests.lua at line 275
    [11.676][11.676:741](),[11.676][11.676:741](),[11.741][11.741:754](),[11.741][11.741:754](),[11.741][11.741:754](),[11.754][11.754:803](),[11.754][11.754:803](),[11.754][11.754:803]()
    -- click past the end of the screen line but within Line_width
    App.draw()
    App.run_after_mouse_click(Line_width-2,y-2, 1)
  • resurrect zombie in text_tests.lua at line 277
    [11.301][11.803:927](),[11.803][11.803:927](),[11.803][11.803:927](),[11.803][11.803:927]()
    -- cursor moves to end of screen line
    check_eq(Cursor1.pos, 20, 'F - test_click_past_end_of_word_wrapping_line/cursor')
  • edit in text.lua at line 676
    [11.133][11.740:836](),[11.133][11.740:836](),[11.836][11.20:20]()
    local screen_line_starting_byte_offset = Text.offset(line.data, screen_line_starting_pos)
  • edit in main_tests.lua at line 68
    [4.1865][4.1865:1870](),[4.1870][11.552:751](),[11.552][11.552:751](),[11.751][11.77:153](),[11.153][11.851:1120](),[11.851][11.851:1120]()
    end
    function test_adjust_line_width()
    io.write('\ntest_adjust_line_width')
    Filename = 'foo'
    App.screen.init{width=Margin_left+300, height=300}
    Line_width = 256
    App.draw() -- initialize button
    App.run_after_mouse_press(256, Margin_top-3, 1)
    App.mouse_move(200, 37)
    -- no change for some time
    App.wait_fake_time(0.01)
    App.update(0)
    check_eq(Line_width, 256, 'F - test_adjust_line_width/early')
    -- after 0.1s the change takes
    App.wait_fake_time(0.1)
    App.update(0)
    check_eq(Line_width, 200, 'F - test_adjust_line_width')
  • edit in main.lua at line 106
    [11.8][11.8:55](),[11.55][11.33:33](),[11.55][11.33:33]()
    -- line-width indicator
    Line_width_hover = nil
  • edit in main.lua at line 195
    [11.217][11.154:189](),[11.189][11.35:35]()
    Last_resize_time = App.getTime()
  • resurrect zombie in main.lua at line 195
    [11.217][10.1274:1380](),[11.217][10.1274:1380]()
    Selection1 = {} -- no support for shift drag while we're resizing
    Text.tweak_screen_top_and_cursor()
  • edit in main.lua at line 197
    [10.1380]
    [11.690]
    Last_resize_time = App.getTime()
  • edit in main.lua at line 231
    [11.336][11.260:261]()
  • edit in main.lua at line 232
    [11.274][11.37:37](),[11.274][11.37:37]()
  • resolve order conflict in main.lua at line 232
    [11.274]
    [8.1144]
  • edit in main.lua at line 315
    [11.609][11.8:45]()
    -- make sure to save before quitting
  • edit in main.lua at line 316
    [11.66][4.1873:1873]()
  • resurrect zombie in main.lua at line 316
    [11.66][7.8:47](),[11.66][7.8:47]()
    -- make sure to save before quitting
  • resolve order conflict in main.lua at line 316
    [11.66]
    [7.8]
  • edit in main.lua at line 320
    [11.68]
    [4.1874]
    -- save some important settings
    local x,y,displayindex = love.window.getPosition()
    local settings = {
    x=x, y=y, displayindex=displayindex,
    width=App.screen.width, height=App.screen.height,
    font_height=Font_height, filename=Filename, screen_top=Screen_top1, cursor=Cursor1}
    love.filesystem.write('config', json.encode(settings))
  • edit in main.lua at line 334
    [11.2][11.707:877]()
    -- we seem to sometimes get phantom clicks if the mouse moves down into text while adjusting line-width
    if Line_width_hover then
    Selection1 = {}
    return
    end
  • edit in main.lua at line 350
    [11.2422][11.738:769](),[11.769][11.49:49]()
    --? print('selection')
  • edit in main.lua at line 569
    [11.68][7.48:396](),[11.68][7.48:396]()
    -- save some important settings
    local x,y,displayindex = love.window.getPosition()
    local settings = {
    x=x, y=y, displayindex=displayindex,
    width=App.screen.width, height=App.screen.height,
    font_height=Font_height, filename=Filename, screen_top=Screen_top1, cursor=Cursor1}
    love.filesystem.write('config', json.encode(settings))
  • resolve order conflict in main.lua at line 569
    [79.331]
  • replacement in drawing_tests.lua at line 196
    [11.1415][11.1415:1468]()
    App.screen.init{width=Margin_left+300, height=300}
    [11.1415]
    [11.1468]
    App.screen.init{width=Margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
  • edit in drawing_tests.lua at line 198
    [11.1512][2.15:86]()
    Line_width = Margin_left+256 -- drawing coordinates 1:1 with pixels
  • edit in drawing_tests.lua at line 469
    [11.2844][9.6095:6189](),[11.2844][9.6095:6189]()
    App.screen.init{width=Margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
  • edit in drawing_tests.lua at line 600
    [11.4357][9.6190:6284](),[11.4357][9.6190:6284](),[11.7265][9.5525:5619](),[11.7265][9.5525:5619](),[11.847][9.5240:5334](),[11.847][9.5240:5334]()
    App.screen.init{width=Margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
    App.screen.init{width=Margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
    App.screen.init{width=Margin_width+256, height=300} -- drawing coordinates 1:1 with pixels
  • resolve order conflict in drawing_tests.lua at line 600
    [81.2215]