resolve conflicts

akkartik
Jun 11, 2024, 6:38 PM
2YRXYXKERFM4O3VCRTWEUSUIHK45N3UI634VKB6QB4O23DNXMF6AC

Dependencies

  • [2] OEZ4KAX6 Merge upstream into main
  • [3] VESAKVTR Merge lines.love
  • [4] 2TCIWW6Z stop caching starty
  • [5] KKMFQDR4 editing source code from within the app
  • [6] OWK3U6VD tests for drawing polygons
  • [7] P4376EXK add state arg to few functions
  • [8] OLZRJ4AX experiment: use digits to draw regular polygons
  • [9] 4CTZOJPC stop pretending globals are local
  • [10] 7JH2ZT3F add state arg to Drawing.draw
  • [11] 42LVB4DE test: naming a point
  • [12] EAEGCJV5 rename
  • [13] 3OTESDW6 move drawing.starty into line cache
  • [14] SGMDI4TC bugfix: alignment of help screen
  • [15] G3DLS5OU audit all asserts
  • [16] 7CEOB56D Merge upstream into main
  • [17] G54H3YG2 get rid of all bifold text
  • [18] YCDYGEZU include drawing index in a few places
  • [19] UHB4GARJ left/right margin -> left/right coordinates
  • [20] P5QNVXSN drop final mention of state global beyond main.lua
  • [21] WTDKUACN rectangle and square shapes
  • [22] CZU7JNNA resolve conflicts
  • [23] R3JZDBI2 drop heavyweight near check on file load/store
  • [24] NYQ7HD4D move
  • [25] 27DROQW2 Merge upstream into main
  • [26] ZS5IYZH5 stop caching screen_bottom1
  • [27] ORRSP7FV deduce test names on failures
  • [28] VHQCNMAR several more modules
  • [29] KTZQ57HV replace globals with args in a few functions
  • [30] 4KC7I3E2 make colors easier to edit
  • [31] AYE2VEGJ extract a couple of methods
  • [32] LNUHQOGH start passing in Editor_state explicitly
  • [33] FNJF2FMQ bugfix: online help
  • [34] BLWAYPKV extract a module
  • [35] 2RO7JXUC Merge upstream into main
  • [36] QXVD2RIF add state arg to Drawing.mouse_released
  • [37] LAW2O3NW extract variable Margin_left
  • [38] SRVDX4I5 local var
  • [39] DXT4QTAH a few more integer coordinates
  • [40] W7JMT5V2 rip out most support for polygons
  • [41] BCRJ6MHL Merge upstream into main
  • [42] WDMPH4AN drop support for squares
  • [43] YW2GO3U4 bugfix: crash in Text.up() after return
  • [44] XNFTJHC4 split keyboard handling between Text and Drawing
  • [45] 5SM6DRHK port inscript's bugfix to source editor
  • [46] KMSL74GA support selections in the source editor
  • [47] 6DE7RBZ6 move mouse_released events to Drawing
  • [48] LF7BWEG4 group all editor globals
  • [49] DDXXXXBR new mode for polygons
  • [50] 23MA4T3G add state arg to Drawing.keychord_pressed
  • [51] MP2TBKU6 bugfix: crash in Text.up() after return
  • [52] HOSPP2AN crisp font rendering
  • [53] 3HVBAZPA add state arg to a few functions
  • [54] 3OKKTUT4 up and down arrow now moving by screen line where possible
  • [55] CUFW4EJL reorganize app.lua and its comments
  • [56] C6QTJYA4 keep online help inside of drawing
  • [*] BULPIBEG beginnings of a module for the text editor
  • [*] K2X6G75Z start writing some tests for drawings
  • [*] 3QNOKBFM beginnings of a test harness

Change contents

  • edit in text.lua at line 964
    [5.880]
    [5.880]
    function Text.eq2(a, b)
    return a.line == b.line and a.screen_line == b.screen_line and a.screen_pos == b.screen_pos
    end
  • edit in text.lua at line 975
    [5.1157][5.24:24](),[5.24][5.875:880](),[5.559][5.875:880](),[5.880][5.3069:3187](),[5.880][5.3069:3187]()
    end
    function Text.eq2(a, b)
    return a.line == b.line and a.screen_line == b.screen_line and a.screen_pos == b.screen_pos
  • resurrect zombie in text.lua at line 975
    [5.3187][5.3187:3192](),[5.3187][5.3187:3192]()
    end
  • edit in source_text.lua at line 442
    [4.2593]
    [4.2593]
    if State.lines[loc2.line].mode == 'drawing' then
    y = y + Drawing_padding_top
    end
  • replacement in source_text.lua at line 449
    [4.2781][4.2781:2874]()
    y = y + Drawing_padding_height + Drawing.pixels(State.lines[loc2.line].h, State.width)
    [4.2781]
    [4.2874]
    y = y + Drawing.pixels(State.lines[loc2.line].h, State.width) + Drawing_padding_bottom
  • edit in source_text.lua at line 1108
    [5.7723][5.145702:145727](),[5.145702][5.145702:145727]()
    --? print('too low')
  • replacement in source_text.lua at line 1109
    [5.145772][5.145772:145797](),[5.145797][5.5855:5879](),[5.5879][5.7724:7859](),[5.7859][5.6026:6034](),[5.6026][5.6026:6034]()
    --? print('tweak')
    State.cursor1 = {
    line=screen_bottom1.line,
    pos=Text.to_pos_on_line(State, screen_bottom1.line, State.right-5, App.screen.height-5),
    }
    [5.145772]
    [5.145985]
    State.cursor1 = Text.final_text_loc_on_screen(State)
  • replacement in source_select.lua at line 72
    [5.4297][5.4297:4359]()
    if y < State.line_cache[State.screen_top1.line].starty then
    [5.4297]
    [5.4359]
    if y < State.top then
  • resurrect zombie in help.lua at line 45
    [5.19842][2.815:878](),[5.19842][2.815:878]()
    y = y + State.line_height
    App.color(Help_background_color)
  • edit in help.lua at line 47
    [2.878][5.208:355](),[5.349][5.208:355](),[5.349][5.208:355]()
    love.graphics.rectangle('fill', State.left,line_cache.starty, State.width, math.max(Drawing.pixels(drawing.h, State.width),y-line_cache.starty))
  • resurrect zombie in help.lua at line 47
    [5.349][4.3728:3853](),[5.349][4.3728:3853]()
    love.graphics.rectangle('fill', State.left,starty, State.width, math.max(Drawing.pixels(drawing.h, State.width),y-starty))
  • resolve order conflict in help.lua at line 47
    [2.878]
    [4.3728]
  • resurrect zombie in help.lua at line 109
    [5.910][2.1382:1417](),[5.910][2.1382:1417]()
    App.color(Help_background_color)
  • edit in help.lua at line 110
    [2.1417][5.549:696](),[5.410][5.549:696](),[5.410][5.549:696]()
    love.graphics.rectangle('fill', State.left,line_cache.starty, State.width, math.max(Drawing.pixels(drawing.h, State.width),y-line_cache.starty))
  • resurrect zombie in help.lua at line 110
    [5.410][4.3929:4054](),[5.410][4.3929:4054]()
    love.graphics.rectangle('fill', State.left,starty, State.width, math.max(Drawing.pixels(drawing.h, State.width),y-starty))
  • resolve order conflict in help.lua at line 110
    [2.1417]
    [4.3929]
  • edit in drawing_tests.lua at line 234
    [5.52698][5.52698:52796](),[5.52698][5.52698:52796]()
    check_eq(Editor_state.line_cache[1].starty, Editor_state.top+Drawing_padding_top, 'baseline/y')
  • resurrect zombie in drawing_tests.lua at line 235
    [4.4795][5.52796:52916](),[5.52796][5.52796:52916](),[5.52796][5.52796:52916]()
    check_eq(Editor_state.lines[1].h, 128, 'baseline/y')
    check_eq(#Editor_state.lines[1].shapes, 0, 'baseline/#shapes')
  • edit in drawing_tests.lua at line 330
    [5.55046][4.4984:5077](),[5.55046][4.4984:5077]()
    check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y')
  • replacement in drawing.lua at line 73
    [5.1279][5.19:104](),[5.1279][4.5658:5725]()
    Drawing.draw_pending_shape(State, line, line_cache.starty, State.left,State.right)
    Drawing.draw_pending_shape(line, starty, State.left,State.right)
    [5.1279]
    [5.10]
    Drawing.draw_pending_shape(State, line, starty, State.left,State.right)
  • edit in drawing.lua at line 210
    [5.6240][5.106:106](),[5.6240][5.106:106]()
  • resolve order conflict in drawing.lua at line 210
    [5.6240]
    [4.5726]
  • replacement in drawing.lua at line 358
    [5.3948][5.107:219]()
    local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-line_cache.starty, State.width)
    [5.3948]
    [5.7105]
    local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width)
  • edit in drawing.lua at line 433
    [5.936][5.4355:4551](),[5.936][5.4355:4551](),[5.690][4.7570:7809](),[5.690][4.7570:7809]()
    local _,drawing,line_cache = Drawing.current_drawing(State)
    local mx,my = Drawing.coord(App.mouse_x()-State.left, State.width), Drawing.coord(App.mouse_y()-line_cache.starty, State.width)
    local drawing_index,drawing = Drawing.current_drawing(State)
    local starty = Text.starty(State, drawing_index)
    local mx,my = Drawing.coord(App.mouse_x()-State.left, State.width), Drawing.coord(App.mouse_y()-starty, State.width)
  • resurrect zombie in drawing.lua at line 433
    [5.936][4.7810:8049](),[5.936][4.7810:8049]()
    local drawing_index,drawing = Drawing.current_drawing(State)
    local starty = Text.starty(State, drawing_index)
    local mx,my = Drawing.coord(App.mouse_x()-State.left, State.width), Drawing.coord(App.mouse_y()-starty, State.width)
  • resurrect zombie in drawing.lua at line 436
    [5.2661][5.7963:8042](),[5.4551][5.7963:8042](),[4.8049][5.7963:8042](),[5.2661][5.7963:8042](),[5.39140][5.7963:8042](),[5.4551][5.7963:8042]()
    local j = Drawing.find_or_insert_point(drawing.points, mx,my, State.width)
  • edit in drawing.lua at line 734
    [5.1525][5.221:221](),[5.2366][4.7262:7365](),[5.2366][4.7262:7365](),[5.1231][4.7056:7157](),[5.1231][4.7056:7157](),[5.1231][4.7056:7157]()
    local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width)
    local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width)
  • resolve order conflict in drawing.lua at line 734
    [5.1525]
  • replacement in app.lua at line 134
    [5.8755][4.9246:9278]()
    --? test_click_moves_cursor()
    [5.8755]
    [5.842]
    --? test_draw_rectangle()