resolve conflicts

akkartik
Jun 11, 2024, 7:22 PM
CRBLAWBOTECOU5MFURWCRBR43OO7NWIHP5LC35IMGTQKN73AUS6AC

Dependencies

  • [2] CGASWIHL irrelevant issue fork this fork
  • [3] ESH2GCJ6 pijul bug
  • [4] NBTKJTI5 resolve conflicts
  • [5] GVJEOWYQ resolve conflicts
  • [6] TMWSQNZD bugfix in source editor: don't clear selection on M-arrow
  • [7] N33WSVVO whitespace
  • [8] NSM73TX3 crap, fix some final changes in the source editor
  • [9] LYN3L74W correct commit f3abc2cbf2
  • [10] GNQC72UX generalize a function
  • [11] WK6UK5AJ enhance bugfix of commit a9aa3436f (Dec 2024)
  • [12] XX7G2FFJ intermingle freehand line drawings with text
  • [13] LNUHQOGH start passing in Editor_state explicitly
  • [14] KKMFQDR4 editing source code from within the app
  • [15] JYZKEDDG Merge lines.love
  • [16] MXSAHZN4 Merge lines.love
  • [17] LWPFEZBI Merge lines.love
  • [18] XS3PZI7G Merge lines.love
  • [19] SVJZZDC3 snapshot - no, that's all wrong
  • [20] WTDKUACN rectangle and square shapes
  • [21] MP2TBKU6 bugfix: crash in Text.up() after return
  • [22] Z5HLXU4P add state arg to a few functions
  • [23] WKXJNESI resolve conflicts
  • [24] 6DE7RBZ6 move mouse_released events to Drawing
  • [25] DSLD74DK lots more tests
  • [26] 4KC7I3E2 make colors easier to edit
  • [27] DLQAEAC7 add state arg to Drawing.mouse_pressed
  • [28] MUJTM6RE bring back a level of wrapping
  • [29] 4SR3Z4Y3 document the version of LÖVE I've been using
  • [30] 62JEPVQ3 bugfix: backspace from start of final line
  • [31] VBU5YHLR Merge lines.love
  • [32] 6XCJX4DZ bugfix: inscript's bug
  • [33] 5SM6DRHK port inscript's bugfix to source editor
  • [34] TGHAJBES use line cache for drawings as well
  • [35] PJEQCTBL add state arg to Drawing.update
  • [36] OWK3U6VD tests for drawing polygons
  • [37] 4J3Y3DJW pijul bug: redo upstream change
  • [38] 5DOTWNVM right margin
  • [39] 656FM555 bugfix: clear selection when clicking above or below lines
  • [40] G3DLS5OU audit all asserts
  • [41] 4YDBYBA4 clean up memory leak experiments
  • [42] 3PSFWAIL Merge lines.love
  • [43] 3TI67SEJ more bugfix
  • [44] 2EKE4XLL simplify
  • [45] ZPUQSPQP extract a few methods
  • [46] JFFUF5AL override mouse state lookups in tests
  • [47] VOU73AK6 Merge lines.love
  • [48] UHB4GARJ left/right margin -> left/right coordinates
  • [49] MXA3RZYK deduce left/right from state where possible
  • [50] XNFTJHC4 split keyboard handling between Text and Drawing
  • [51] GFXWHTE6 mouse wheel support
  • [52] SGMA5JLE save the list of tests in repo
  • [53] KOYAJWE4 extract a couple more methods
  • [54] TFUNIT6M resolve conflicts
  • [55] ZS5IYZH5 stop caching screen_bottom1
  • [56] VHUNJHXB Merge lines.love
  • [57] Z3BQO2RK typo
  • [58] BXJMGTV2 hoist couple of variables out
  • [59] A4BSGS2C Merge lines.love
  • [60] LAW2O3NW extract variable Margin_left
  • [61] DLQMM265 scroll past first page
  • [62] AVFRVNFR better handle moving points
  • [63] QXVD2RIF add state arg to Drawing.mouse_released
  • [64] CNCYMM6A make test initializations a little more obvious
  • [65] 2CTN2IEF Merge lines.love
  • [66] VP5KC4XZ Merge lines.love
  • [67] 73OCE2MC after much struggle, a brute-force undo
  • [68] 7CLGG7J2 test: autosave after any shape
  • [69] NHA7RUFI move current mode indicator slightly
  • [70] RAXUQQ6Z Merge lines.love
  • [71] OI4FPFIN support drawings in the source editor
  • [72] 34BZ5ZKN Merge lines.love
  • [73] AYG2PQCG fix a couple of asserts missed in the recent audit
  • [74] QCPXQ2E3 add state arg to a few functions
  • [75] D2GCFTTT clean up repl functionality
  • [76] 2JBAEQHU Merge lines.love
  • [77] 25V2GA6J taking stock
  • [78] GGJEDJOO add args to some functions
  • [79] SRVDX4I5 local var
  • [80] K2X6G75Z start writing some tests for drawings
  • [81] CUIV2LE5 some typos
  • [82] W2CQ7YNG more chunks, same approach
  • [83] 2TQR4PSY add args to some functions
  • [84] EAEGCJV5 rename
  • [85] 65HNIAOS make freehand drawings smoother
  • [86] 3HVBAZPA add state arg to a few functions
  • [87] NHNP76LG swap return values
  • [88] KMSL74GA support selections in the source editor
  • [89] FNJF2FMQ bugfix: online help
  • [90] CE4LZV4T drop last couple of manual tests
  • [91] JOPVPUSA editing source code from within the app
  • [92] BH7BT36L ctrl+a: select entire buffer
  • [93] BTKAW76L rename
  • [94] Z3IQ6A4R bugfix
  • [95] ONHKBLLC Merge lines.love
  • [96] WJBZZQE4 fold together two largely similar cases
  • [97] TOXPJJYY resolve conflicts
  • [98] JYB3RFWH bugfix in source editor
  • [99] ZZ2B5RPQ extract variables for drawing padding
  • [100] AH744RFR show when we're naming a point
  • [101] DRFE3B3Z mouse buttons are integers, not strings
  • [102] VHQCNMAR several more modules
  • [103] B4FAIVRA Merge lines.love
  • [104] QFC3WRDZ chunking by simple local variable
  • [105] QAMVLUK2 fix a crash involving mouse and drawings
  • [106] LIKTH6HM update stale source X-(
  • [107] 2344TV56 Merge lines.love
  • [108] LUNH47XX make text and drawings the same width
  • [109] BYG5CEMV support for naming points
  • [110] TGZAJUEF bring back a set of constants
  • [111] JJ7J4PUB some unnecessary mutations
  • [112] KTZQ57HV replace globals with args in a few functions
  • [113] 23MA4T3G add state arg to Drawing.keychord_pressed
  • [114] L6XA5EY2 test: moving a point
  • [115] ED4Z6ORC cleaner API for file-system access
  • [116] CSXIZ4FA resolve conflicts
  • [117] TLOAPLBJ add a license
  • [118] 3QNOKBFM beginnings of a test harness
  • [119] 5BMR5HRT click to the left of a line
  • [120] ORKN6EOB Merge lines.love
  • [121] 7YGYHOEO Merge lines.love
  • [122] AVTNUQYR basic test-enabled framework
  • [123] 2TQUKHBC Merge lines.love
  • [124] YXQOITYS Merge lines.love
  • [125] ZLJYLPOT Merge lines.love
  • [126] P5QNVXSN drop final mention of state global beyond main.lua
  • [127] VTCPDL3A resolve conflicts
  • [128] TXI6GSQD some minor cleanup
  • [129] BULPIBEG beginnings of a module for the text editor
  • [130] 66X36NZN a little more prose describing manual_tests
  • [131] GZ5WULJV switch source side to new screen-line-based render
  • [132] KYNGDE2C consistent names in a few more places
  • [133] MD3W5IRA new fork: rip out drawing support
  • [134] 5UKUADTW distinguish consistently between mouse buttons and other buttons
  • [135] LF7BWEG4 group all editor globals
  • [136] G54H3YG2 get rid of all bifold text
  • [137] KV7GGVER couple of accidental globals
  • [138] 3OTESDW6 move drawing.starty into line cache
  • [139] LXTTOB33 extract a couple of files
  • [140] P4376EXK add state arg to few functions
  • [141] 3XNFQDDN Merge lines.love
  • [142] BLWAYPKV extract a module
  • [143] OTIBCAUJ love2d scaffold
  • [144] WLJCIXYM add state arg to a few functions
  • [145] R3XGABER chunk up some long lines
  • [146] OJBGNAN6 slight reorg in Readme
  • [147] 6LJZN727 handle chords
  • [148] HYEAFRZ2 split mouse_pressed events between Text and Drawing
  • [149] R5QXEHUI somebody stop me
  • [150] HOSPP2AN crisp font rendering
  • [151] KZ5GAYRP this fixes the immediate regression
  • [152] BJ5X5O4A let's prevent the text cursor from ever getting on a drawing
  • [153] C6QTJYA4 keep online help inside of drawing
  • [154] QCQTMUZ7 add args to some functions
  • [155] ZTMRQZSW Readme
  • [156] EHSUSZMK more idiomatic variable names
  • [157] HTWAM4NZ bugfix: scrolling in left/right movements
  • [158] KOTNETIM repeat changes on source editor
  • [159] UTDSCN3G Merge lines.love
  • [160] NYQ7HD4D move
  • [161] Q7XPSKII Merge lines.love
  • [162] T4FRZSYL delete an ancient, unused file
  • [163] FS2ITYYH record a known issue
  • [164] REAIVN7W Merge lines.love
  • [165] PXSQR2AD hide line numbers from log browser
  • [166] QMRQL2FO resolve conflicts
  • [167] FHNPQBLK more carefully pass the 'key' arg around
  • [168] KWIVKQQ7 Merge lines.love
  • [169] 2CH77LZC add args to some functions
  • [170] M6TH7VSZ rip out notion of Line_width
  • [171] RT6EV6OP delegate update events to drawings
  • [172] OGUV4HSA remove some memory leaks from rendered fragments
  • [173] FZCKGO2I make local functions look different
  • [174] 32V6ZHQB Merge lines.love
  • [175] 4PHGNJN6 assume starty can be nil in update
  • [176] 6VJTQKW7 start supporting LÖVE v12
  • [177] B4JEWKWI hide editor cursor while in file navigator
  • [178] 2CK5QI7W make love event names consistent
  • [179] TBTRYEBP Merge lines.love
  • [180] D4B52CQ2 Merge lines.love
  • [181] 2TCIWW6Z stop caching starty
  • [182] 2L5MEZV3 experiment: new edit namespace
  • [183] IDGP4BJZ new known issue with drawings
  • [184] APX2PY6G stop tracking wallclock time
  • [185] VXORMHME delete experimental REPL
  • [186] ORRSP7FV deduce test names on failures
  • [187] KKQKPGCI resolve conflicts
  • [188] TVCPXAAU rename
  • [189] 3RGHOJ25 DRY some code
  • [190] 7JH2ZT3F add state arg to Drawing.draw
  • [191] 2MGBV7NP bugfix: crash when using mouse wheel
  • [192] R2ASHK5C fix a bad merge
  • [193] MBAJPTDJ resolve conflicts
  • [194] YJGADSGK delete unused arg
  • [195] SCOXD4EO Merge lines.love
  • [196] BW2IUB3K keep all text cache writes inside text.lua
  • [197] RSZD5A7G forgot to add json.lua
  • [198] ILOA5BYF separate data structure for each line's cache data
  • [199] CPZGQT72 go through and fix similar issues
  • [200] N2NUGNN4 include a brief reference enabling many useful apps
  • [201] JAXPXLEB set current_drawing_index with current_drawing
  • [202] GIG6OV3G port keyboard layout handling to source editor
  • [203] YCDYGEZU include drawing index in a few places
  • [204] AQMZJXUR use editor state font for width calculations
  • [205] C45WCXJ2 keep drawings within the line width slider as well

Change contents

  • file deletion: source_text_tests.lua (----------)source_text_tests.lua (----------)
    [9.2][9.83676:83721](),[9.2][9.83676:83721](),[9.83721][9.3498:3498]()
    App.screen.init{width=800, height=600}
    edit.run_after_keychord(Editor_state, 'M-right', 'right')
    edit.run_after_keychord(Editor_state, 'M-right', 'right')
    edit.draw(Editor_state) -- populate line_cache.startpos for each line
    edit.run_after_keychord(Editor_state, 'S-right', 'right')
    edit.run_after_keychord(Editor_state, 'right', 'right')
    edit.draw(Editor_state) -- populate line_cache.startpos for each line
    edit.draw(Editor_state) -- populate line_cache.startpos for each line
    edit.draw(Editor_state) -- populate line_cache.startpos for each line
    edit.draw(Editor_state) -- populate line_cache.startpos for each line
    edit.run_after_keychord(Editor_state, 'right', 'right')
    check_eq(Editor_state.screen_top1.line, 2, 'screen_top')
    check_eq(Editor_state.cursor1.line, 3, 'cursor:line')
    check_eq(Editor_state.cursor1.pos, 6, 'cursor:pos')
    -- click on first location
    edit.run_after_mouse_press(Editor_state, Editor_state.left+8,Editor_state.top+5, 1)
    edit.run_after_mouse_release(Editor_state, Editor_state.left+8,Editor_state.top+5, 1)
    -- hold down shift and click on a second location
    App.fake_key_press('lshift')
    edit.run_after_mouse_press(Editor_state, Editor_state.left+20,Editor_state.top+5, 1)
    edit.run_after_mouse_release(Editor_state, Editor_state.left+20,Editor_state.top+Editor_state.line_height+5, 1)
    -- hold down shift and click at a third location
    App.fake_key_press('lshift')
    edit.run_after_mouse_press(Editor_state, Editor_state.left+20,Editor_state.top+5, 1)
    edit.run_after_mouse_release(Editor_state, Editor_state.left+8,Editor_state.top+Editor_state.line_height+5, 1)
    App.fake_key_release('lshift')
    -- selection is between first and third location. forget the second location, not the first.
    -- click on first location
    edit.run_after_mouse_press(Editor_state, Editor_state.left+8,Editor_state.top+5, 1)
    edit.run_after_mouse_release(Editor_state, Editor_state.left+8,Editor_state.top+5, 1)
    -- hold down shift and click somewhere else
    App.fake_key_press('lshift')
    edit.run_after_mouse_press(Editor_state, Editor_state.left+20,Editor_state.top+5, 1)
    edit.run_after_mouse_release(Editor_state, Editor_state.left+20,Editor_state.top+Editor_state.line_height+5, 1)
    App.fake_key_release('lshift')
    -- press mouse above first line of text
    edit.run_after_mouse_press(Editor_state, Editor_state.left+8,5, 1)
    check(Editor_state.selection1.line ~= nil, 'selection:line-not-nil')
    check_eq(Editor_state.selection1.line, 1, 'selection:line')
    check_eq(Editor_state.selection1.pos, 1, 'selection:pos')
    -- press and hold on first location
    edit.run_after_mouse_press(Editor_state, Editor_state.left+8,Editor_state.top+5, 1)
    -- drag and release somewhere else
    edit.run_after_mouse_release(Editor_state, Editor_state.left+20,Editor_state.top+Editor_state.line_height+5, 1)
    -- no change to data, selection is reset
    App.fake_key_release('lshift')
    edit.run_after_mouse_release(Editor_state, Editor_state.left+8,Editor_state.top+5, 1)
    check_eq(Editor_state.cursor1.line, 2, 'line')
    check_eq(Editor_state.cursor1.pos, 4, 'pos')
    check_eq(Editor_state.cursor1.pos, 9, 'check')
    Editor_state = edit.initialize_test_state()
    Editor_state.lines = load_array{}
    Text.redraw_all(Editor_state)
    edit.draw(Editor_state)
    edit.run_after_mouse_click(Editor_state, 8,Editor_state.top+8, 1)
    -- cursor skips drawing to always remain on text
  • file deletion: source_text.lua (----------)source_text.lua (----------)
    [9.2][9.147062:147101](),[9.2][9.147062:147101](),[9.147101][9.83723:83723]()
    -- return y for the next line
    return y
    --? print(State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos)
    --? print(State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos)
    --? print('=>', State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos)
    State.screen_top1 = Text.previous_screen_top1(State)
    State.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}
    Text.move_cursor_down_to_next_text_line_while_scrolling_again_if_necessary(State)
    Text.redraw_all(State) -- if we're scrolling, reclaim all fragments to avoid memory leaks
    end
    function Text.previous_screen_top1(State)
    -- does not modify State (except to populate line_cache)
    local loc2 = Text.to2(State, State.screen_top1)
    if loc2.line == 1 and loc2.screen_line == 1 and loc2.screen_pos == 1 then break end
    if State.lines[loc2.line].mode == 'text' then
    elseif State.lines[loc2.line].mode == 'drawing' then
    y = y - Drawing_padding_height - Drawing.pixels(State.lines[loc2.line].h, State.width)
    loc2 = Text.previous_screen_line(State, loc2)
    return Text.to1(State, loc2)
    State.screen_top1 = Text.screen_bottom1(State)
    end
    -- return the location of the start of the bottom-most line on screen
    function Text.screen_bottom1(State)
    -- duplicate some logic from love.draw
    -- does not modify State (except to populate line_cache)
    local loc2 = Text.to2(State, State.screen_top1)
    local y = State.top
    while true do
    if State.lines[loc2.line].mode == 'text' then
    y = y + State.line_height
    elseif State.lines[loc2.line].mode == 'drawing' then
    y = y + Drawing_padding_height + Drawing.pixels(State.lines[loc2.line].h, State.width)
    end
    if y + State.line_height > App.screen.height then break end
    local next_loc2 = Text.next_screen_line(State, loc2)
    if Text.eq2(next_loc2, loc2) then break end
    loc2 = next_loc2
    end
    return Text.to1(State, loc2)
    --? print('down', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos)
    local screen_bottom1 = Text.screen_bottom1(State)
    --? print('down 2', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos, screen_bottom1.line, screen_bottom1.pos)
    if State.cursor1.line > screen_bottom1.line then
    local screen_bottom1 = Text.screen_bottom1(State)
    local scroll_down = Text.le1(screen_bottom1, State.cursor1)
    --? print('=>', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos)
    assert(State.lines[loc1.line].mode == 'text')
    function Text.final_text_loc_on_screen(State)
    local screen_bottom1 = Text.screen_bottom1(State)
    if State.lines[screen_bottom1.line].mode == 'text' then
    return {
    line=screen_bottom1.line,
    pos=Text.pos_at_end_of_screen_line(State, screen_bottom1),
    }
    end
    local loc2 = Text.to2(State, screen_bottom1)
    while true do
    if State.lines[loc2.line].mode == 'text' then break end
    assert(loc2.line > 1 or loc2.screen_line > 1 and loc2.screen_pos > 1) -- elsewhere we're making sure there's always at least one text line on screen
    loc2 = Text.previous_screen_line(State, loc2)
    end
    local result = Text.to1(State, loc2)
    result.pos = Text.pos_at_end_of_screen_line(State, result)
    return result
    end
    --? print('snap', State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos)
    --? print('snap =>', State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos)
    local starty = Text.starty(State, line_index)
    if starty == nil then return false end -- outside current page
    if y < starty then return false end
    return y < starty + State.line_height*(#line_cache.screen_line_starting_pos - Text.screen_line_index(line_cache.screen_line_starting_pos, line_cache.startpos) + 1)
    local starty = Text.starty(State, line_index)
    assert(my >= starty, 'failed to map y pixel to line')
    local y = starty
    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
    end
    end
    function Text.next_screen_line(State, loc2)
    if State.lines[loc2.line].mode == 'drawing' then
    return {line=loc2.line+1, screen_line=1, screen_pos=1}
    end
    Text.populate_screen_line_starting_pos(State, loc2.line)
    if loc2.screen_line >= #State.line_cache[loc2.line].screen_line_starting_pos then
    if loc2.line < #State.lines then
    return {line=loc2.line+1, screen_line=1, screen_pos=1}
    else
    return loc2
    end
    else
    return {line=loc2.line, screen_line=loc2.screen_line+1, screen_pos=1}
    local screen_bottom1 = Text.screen_bottom1(State)
    elseif State.cursor1.line >= screen_bottom1.line then
    State.cursor1 = Text.final_text_loc_on_screen(State)
    end
    end
    end
    -- slightly expensive since it redraws the screen
    function Text.cursor_out_of_screen(State)
    if Text.lt1(State.cursor1, State.screen_top1) then
    State.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}
    end
    end
    function Text.offset(s, pos1)
    if pos1 == 1 then return 1 end
    local result = utf8.offset(s, pos1)
    if result == nil then
    local start_screen_line_index = Text.screen_line_index(line_cache.screen_line_starting_pos, line_cache.startpos)
    for screen_line_index = start_screen_line_index,#line_cache.screen_line_starting_pos do
    local screen_line_starting_pos = line_cache.screen_line_starting_pos[screen_line_index]
    local screen_line_starting_byte_offset = Text.offset(line.data, screen_line_starting_pos)
    --? print('iter', y, screen_line_index, screen_line_starting_pos, string.sub(line.data, screen_line_starting_byte_offset))
    -- duplicate some logic from Text.draw
    end
    -- convert mx,my in pixels to schema-1 coordinates
    Text.populate_screen_line_starting_pos(State, line_index)
    Text.redraw_all(State) -- if we're scrolling, reclaim all fragments to avoid memory leaks
    --? print('cursor pos '..tostring(State.cursor1.pos)..' is on the #'..tostring(top2.screen_line)..' screen line down')
    local y = App.screen.height - State.line_height
    -- duplicate some logic from love.draw
    while true do
    function Text.cursor_at_final_screen_line(State)
    Text.populate_screen_line_starting_pos(State, State.cursor1.line)
    Text.populate_screen_line_starting_pos(State, loc1.line)
    local line_cache = State.line_cache[loc1.line]
    local most_recent_final_pos = utf8.len(State.lines[loc1.line].data)+1
    for i=#line_cache.screen_line_starting_pos,1,-1 do
    local spos = line_cache.screen_line_starting_pos[i]
    if spos <= loc1.pos then
    return most_recent_final_pos
    end
    most_recent_final_pos = spos-1
    end
    end
    function Text.start_of_line(State)
    --? print('cursor is NOT at final screen line of its line')
    local screen_line_starting_pos, screen_line_index = Text.pos_at_start_of_screen_line(State, State.cursor1)
    Text.populate_screen_line_starting_pos(State, State.cursor1.line)
    local new_screen_line_starting_pos = State.line_cache[State.cursor1.line].screen_line_starting_pos[screen_line_index+1]
    --? print('switching pos of screen line at cursor from '..tostring(screen_line_starting_pos)..' to '..tostring(new_screen_line_starting_pos))
    local new_screen_line_starting_byte_offset = Text.offset(State.lines[State.cursor1.line].data, new_screen_line_starting_pos)
    local s = string.sub(State.lines[State.cursor1.line].data, new_screen_line_starting_byte_offset)
    --? print('screen top before:', State.screen_top1.line, State.screen_top1.pos)
    --? print('scroll up preserving cursor')
    Text.snap_cursor_to_bottom_of_screen(State)
    --? print('screen top after:', State.screen_top1.line, State.screen_top1.pos)
    end
    assert(State.cursor1.pos, 'cursor has no pos')
    end
    function Text.up(State)
    State.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}
    end
    function Text.pagedown(State)
    end
    end
    y = y - State.line_height
    local y = App.screen.height - State.line_height
    while y >= State.top do
    -- duplicate some logic from love.draw
    -- return the top y coordinate of a given line_index,
    -- or nil if no part of it is on screen
    function Text.starty(State, line_index)
    -- duplicate some logic from love.draw
    -- does not modify State (except to populate line_cache)
    if line_index < State.screen_top1.line then return end
    local loc2 = Text.to2(State, State.screen_top1)
    local y = State.top
    while true do
    if loc2.line == line_index then return y end
    if State.lines[loc2.line].mode == 'text' then
    y = y + State.line_height
    elseif State.lines[loc2.line].mode == 'drawing' then
    y = y + Drawing.pixels(State.lines[loc2.line].h, State.width) + Drawing_padding_bottom
    end
    if y + State.line_height > App.screen.height then break end
    local next_loc2 = Text.next_screen_line(State, loc2)
    if Text.eq2(next_loc2, loc2) then break end -- end of file
    loc2 = next_loc2
    end
    end
    if State.lines[loc2.line].mode == 'drawing' then
    y = y + Drawing_padding_top
    end
    end
    schedule_save(State)
    record_undo_event(State, {before=before, after=snapshot(State, State.cursor1.line)})
    elseif chord == 'backspace' then
    Text.insert_at_cursor(State, '\t')
    if State.cursor_y > App.screen.height - State.line_height then
    Text.populate_screen_line_starting_pos(State, State.cursor1.line)
    Text.snap_cursor_to_bottom_of_screen(State, State.left, State.right)
    Text.insert_at_cursor(State, t)
    if State.cursor_y > App.screen.height - State.line_height then
    Text.populate_screen_line_starting_pos(State, State.cursor1.line)
    Text.snap_cursor_to_bottom_of_screen(State, State.left, State.right)
    end
    record_undo_event(State, {before=before, after=snapshot(State, State.cursor1.line)})
    end
    function Text.insert_at_cursor(State, t)
    end
    function Text.screen_line(line, line_cache, i)
    local pos = line_cache.screen_line_starting_pos[i]
    local offset = Text.offset(line.data, pos)
    if i >= #line_cache.screen_line_starting_pos then
    return line.data:sub(offset)
    function Text.draw(State, line_index, y, startpos, hide_cursor, show_line_numbers)
  • file deletion: source_edit.lua (----------)source_edit.lua (----------)
    [9.2][9.165725:165764](),[9.2][9.165725:165764](),[9.165764][9.152440:152440]()
    --
    -- On lines that are drawings, pos will be nil.
    cursor1 = {line=1, pos=1}, -- position of cursor; must be on a text line
    y = Text.draw(State, line_index, y, startpos, hide_cursor, show_line_numbers)
    if Drawing.in_drawing(State, line_index, x, y, State.left,State.right) then
    State.selection1 = Text.final_text_loc_on_screen(State)
    State.cursor1 = Text.final_text_loc_on_screen(State)
    State.cursor1 = Text.screen_bottom1(State)
    chord ~= 'C-a' and chord ~= 'C-c' and chord ~= 'C-x' and chord ~= 'backspace' and chord ~= 'delete' and chord ~= 'C-z' and chord ~= 'C-y' and not App.is_cursor_movement(key) then
    edit.draw(State)
    App.fake_mouse_release(x,y, mouse_button)
    Text.delete_selection(State, State.left, State.right)
    end
    edit.put_cursor_on_next_text_line(State)
    edit.clean_up_mouse_press(State)
    end
    State.lines.current_drawing_index = line_index
    State.lines.current_drawing = line
    Drawing.before = snapshot(State, line_index)
    --? print('=> y', y)
    elseif line.mode == 'drawing' then
    y = y+Drawing_padding_top
    Drawing.draw(State, line_index, y)
    y = y + Drawing.pixels(line.h, State.width) + Drawing_padding_bottom
    else
    screen_top1 = {line=1, pos=1}, -- position of start of screen line at top of screen
  • edit in text_tests.lua at line 16
    [9.519][9.0:41](),[9.519][9.0:41]()
    App.screen.init{width=800, height=600}
  • edit in text.lua at line 359
    [9.802][9.802:897]()
    if State.lines[loc2.line].mode == 'drawing' then
    y = y + Drawing_padding_top
    end
  • replacement in text.lua at line 360
    [9.946][9.946:1186]()
    if State.lines[loc2.line].mode == 'text' then
    y = y + State.line_height
    elseif State.lines[loc2.line].mode == 'drawing' then
    y = y + Drawing.pixels(State.lines[loc2.line].h, State.width) + Drawing_padding_bottom
    end
    [9.946]
    [9.1186]
    y = y + State.line_height
  • edit in text.lua at line 374
    [9.2828][9.3890:3920](),[9.2828][9.3890:3920]()
    y = y - State.line_height
  • resurrect zombie in text.lua at line 374
    [9.16711][9.817:905](),[9.16711][9.817:905](),[9.563][9.1107:1157](),[9.563][9.1107:1157]()
    if loc2.line == 1 and loc2.screen_line == 1 and loc2.screen_pos == 1 then break end
    loc2 = Text.previous_screen_line(State, loc2)
  • replacement in text.lua at line 375
    [9.905][9.905:955](),[9.905][9.905:955](),[9.2923][9.956:1106](),[9.2923][9.956:1106]()
    if State.lines[loc2.line].mode == 'text' then
    elseif State.lines[loc2.line].mode == 'drawing' then
    y = y - Drawing_padding_height - Drawing.pixels(State.lines[loc2.line].h, State.width)
    [9.905]
    [9.1107]
    y = y - State.line_height
  • replacement in text.lua at line 395
    [9.1539][9.1539:1779]()
    if State.lines[loc2.line].mode == 'text' then
    y = y + State.line_height
    elseif State.lines[loc2.line].mode == 'drawing' then
    y = y + Drawing_padding_height + Drawing.pixels(State.lines[loc2.line].h, State.width)
    end
    [9.1539]
    [9.1779]
    y = y + State.line_height
  • replacement in text.lua at line 443
    [9.1152][9.2007:2113](),[9.1152][9.2007:2113]()
    --? print('down', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos)
    [9.1280]
    [9.1153]
    print('down', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos)
  • replacement in text.lua at line 447
    [9.2960][9.2960:3017]()
    --? print('cursor at final screen line of its line')
    [9.2960]
    [9.5428]
    print('cursor at final screen line of its line')
  • replacement in text.lua at line 452
    [9.263][9.5679:5714](),[9.4544][9.5679:5714](),[9.5679][9.5679:5714]()
    --? print(State.cursor1.pos)
    [9.263]
    [9.265]
    print(State.cursor1.pos)
  • replacement in text.lua at line 455
    [9.2168][9.2168:2317]()
    --? print('down 2', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos, screen_bottom1.line, screen_bottom1.pos)
    [9.2168]
    [9.2317]
    print('down 2', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos, screen_bottom1.line, screen_bottom1.pos)
  • replacement in text.lua at line 457
    [9.2370][9.6537:6622](),[9.6537][9.6537:6622](),[9.6622][9.3515:3562](),[9.70860][9.3515:3562](),[9.3515][9.3515:3562]()
    --? print('screen top before:', State.screen_top1.line, State.screen_top1.pos)
    --? print('scroll up preserving cursor')
    [9.2370]
    [9.1451]
    print('screen top before:', State.screen_top1.line, State.screen_top1.pos)
    print('scroll up preserving cursor')
  • replacement in text.lua at line 460
    [9.1385][9.6623:6707](),[9.1501][9.6623:6707](),[9.321][9.6623:6707]()
    --? print('screen top after:', State.screen_top1.line, State.screen_top1.pos)
    [9.1501]
    [9.3680]
    print('screen top after:', State.screen_top1.line, State.screen_top1.pos)
  • replacement in text.lua at line 466
    [9.73][9.3929:3993](),[9.2489][9.3929:3993](),[9.3929][9.3929:3993]()
    --? print('cursor is NOT at final screen line of its line')
    [9.2489]
    [9.113]
    print('cursor is NOT at final screen line of its line')
  • replacement in text.lua at line 470
    [9.252][9.4192:4338](),[9.688][9.4192:4338](),[9.4875][9.4192:4338](),[9.6880][9.4192:4338](),[9.71160][9.4192:4338](),[9.4192][9.4192:4338]()
    --? print('switching pos of screen line at cursor from '..tostring(screen_line_starting_pos)..' to '..tostring(new_screen_line_starting_pos))
    [9.252]
    [9.4545]
    print('switching pos of screen line at cursor from '..tostring(screen_line_starting_pos)..' to '..tostring(new_screen_line_starting_pos))
  • replacement in text.lua at line 474
    [9.901][9.7219:7293](),[9.1720][9.7219:7293](),[9.7219][9.7219:7293]()
    --? print('cursor pos is now', State.cursor1.line, State.cursor1.pos)
    [9.901]
    [9.130]
    print('cursor pos is now', State.cursor1.line, State.cursor1.pos)
  • replacement in text.lua at line 476
    [9.4631][9.4631:4678]()
    --? print('scroll up preserving cursor')
    [9.154]
    [9.1721]
    print('scroll up preserving cursor')
  • replacement in text.lua at line 478
    [9.1449][9.7294:7378](),[9.1771][9.7294:7378](),[9.378][9.7294:7378]()
    --? print('screen top after:', State.screen_top1.line, State.screen_top1.pos)
    [9.1771]
    [9.4796]
    print('screen top after:', State.screen_top1.line, State.screen_top1.pos)
  • replacement in text.lua at line 481
    [9.4810][9.2490:2594]()
    --? print('=>', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos)
    [9.4810]
    [9.6091]
    print('=>', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos)
  • edit in text.lua at line 601
    [9.1362][9.42:90]()
    assert(State.lines[loc1.line].mode == 'text')
  • replacement in text.lua at line 616
    [9.2647][9.2647:2705](),[9.2705][9.201:214](),[9.201][9.201:214](),[9.214][9.2706:2803](),[9.2803][9.323:335](),[9.323][9.323:335](),[9.335][9.2804:2851](),[9.2851][9.388:790](),[9.388][9.388:790]()
    if State.lines[screen_bottom1.line].mode == 'text' then
    return {
    line=screen_bottom1.line,
    pos=Text.pos_at_end_of_screen_line(State, screen_bottom1),
    }
    end
    local loc2 = Text.to2(State, screen_bottom1)
    while true do
    if State.lines[loc2.line].mode == 'text' then break end
    assert(loc2.line > 1 or loc2.screen_line > 1 and loc2.screen_pos > 1) -- elsewhere we're making sure there's always at least one text line on screen
    loc2 = Text.previous_screen_line(State, loc2)
    end
    local result = Text.to1(State, loc2)
    result.pos = Text.pos_at_end_of_screen_line(State, result)
    return result
    [9.2647]
    [9.790]
    return {
    line=screen_bottom1.line,
    pos=Text.pos_at_end_of_screen_line(State, screen_bottom1),
    }
  • edit in text.lua at line 890
    [9.3248][9.3248:3364]()
    if State.lines[loc2.line].mode == 'drawing' then
    return {line=loc2.line+1, screen_line=1, screen_pos=1}
    end
  • replacement in source_text_tests.lua at line 19
    [9.902][9.902:942]()
    App.screen.init{width=120, height=60}
    [9.857]
    [9.942]
    App.screen.init{width=800, height=600}
  • edit in source_text_tests.lua at line 78
    [9.5794][9.5794:5829]()
    Editor_state.screen_bottom1 = {}
  • replacement in source_text_tests.lua at line 234
    [9.12576][9.963:1024]()
    edit.run_after_keychord(Editor_state, 'M-right', 'right')
    [9.12576]
    [9.1492]
    edit.run_after_keychord(Editor_state, 'M-right', 'right')
  • replacement in source_text_tests.lua at line 245
    [9.13062][9.1025:1086]()
    edit.run_after_keychord(Editor_state, 'M-right', 'right')
    [9.13062]
    [9.1542]
    edit.run_after_keychord(Editor_state, 'M-right', 'right')
  • edit in source_text_tests.lua at line 257
    [9.13674][9.13674:13709]()
    Editor_state.screen_bottom1 = {}
  • replacement in source_text_tests.lua at line 258
    [9.348][9.348:443]()
    edit.draw(Editor_state) -- populate line_cache.starty for each line Editor_state.line_cache
    [9.348]
    [9.443]
    edit.draw(Editor_state) -- populate line_cache.startpos for each line
  • edit in source_text_tests.lua at line 275
    [9.14352][9.14352:14387]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 294
    [9.15257][9.15257:15292]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 312
    [9.16067][9.16067:16102]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 330
    [9.589][9.589:624]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 347
    [9.16673][9.16673:16708]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 363
    [9.17353][9.17353:17388]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 379
    [9.18068][9.18068:18103]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 396
    [9.18881][9.18881:18916]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 414
    [9.19817][9.19817:19852]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 431
    [9.20690][9.20690:20725]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 448
    [9.21562][9.21562:21597]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 466
    [9.22418][9.22418:22453]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 488
    [9.23603][9.23603:23638]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 508
    [9.24697][9.24697:24732]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 531
    [9.25986][9.25986:26021]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 555
    [9.27425][9.27425:27460]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 573
    [9.1072][9.1072:1107]()
    Editor_state.screen_bottom1 = {}
  • replacement in source_text_tests.lua at line 576
    [9.1185][9.1087:1148]()
    edit.run_after_keychord(Editor_state, 'S-right', 'right')
    [9.1185]
    [9.1236]
    edit.run_after_keychord(Editor_state, 'S-right', 'right')
  • edit in source_text_tests.lua at line 595
    [9.2158][9.2158:2193]()
    Editor_state.screen_bottom1 = {}
  • replacement in source_text_tests.lua at line 597
    [9.2257][9.1149:1208]()
    edit.run_after_keychord(Editor_state, 'right', 'right')
    [9.2257]
    [9.2306]
    edit.run_after_keychord(Editor_state, 'right', 'right')
  • edit in source_text_tests.lua at line 612
    [9.2984][9.2984:3019]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 628
    [9.3703][9.3703:3738]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 649
    [9.4686][9.4686:4721]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 666
    [9.5422][9.5422:5457]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 683
    [9.6132][9.6132:6167]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 701
    [9.6896][9.6896:6931]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 724
    [9.28251][9.28251:28286]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 742
    [9.29042][9.29042:29077]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 770
    [9.30431][9.30431:30466]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 786
    [9.31336][9.31336:31371]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 814
    [9.8370][9.8370:8405]()
    Editor_state.screen_bottom1 = {}
  • replacement in source_text_tests.lua at line 815
    [9.8436][9.8436:8531]()
    edit.draw(Editor_state) -- populate line_cache.starty for each line Editor_state.line_cache
    [9.8436]
    [9.8531]
    edit.draw(Editor_state) -- populate line_cache.startpos for each line
  • edit in source_text_tests.lua at line 833
    [9.443][9.443:478]()
    Editor_state.screen_bottom1 = {}
  • replacement in source_text_tests.lua at line 834
    [9.509][9.509:604]()
    edit.draw(Editor_state) -- populate line_cache.starty for each line Editor_state.line_cache
    [9.509]
    [9.604]
    edit.draw(Editor_state) -- populate line_cache.startpos for each line
  • edit in source_text_tests.lua at line 850
    [9.1297][9.1297:1332]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 872
    [9.2356][9.2356:2391]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 892
    [9.9538][9.9538:9573]()
    Editor_state.screen_bottom1 = {}
  • replacement in source_text_tests.lua at line 893
    [9.9604][9.9604:9699]()
    edit.draw(Editor_state) -- populate line_cache.starty for each line Editor_state.line_cache
    [9.9604]
    [9.9699]
    edit.draw(Editor_state) -- populate line_cache.startpos for each line
  • edit in source_text_tests.lua at line 916
    [9.11039][9.11039:11074]()
    Editor_state.screen_bottom1 = {}
  • replacement in source_text_tests.lua at line 917
    [9.11105][9.11105:11200]()
    edit.draw(Editor_state) -- populate line_cache.starty for each line Editor_state.line_cache
    [9.11105]
    [9.11200]
    edit.draw(Editor_state) -- populate line_cache.startpos for each line
  • edit in source_text_tests.lua at line 945
    [9.3260][9.3260:3295]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 966
    [9.12935][9.12935:12970]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 981
    [9.33515][9.33515:33550]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1010
    [9.2889][9.2889:2924]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1033
    [9.34774][9.34774:34809]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1067
    [9.36454][9.36454:36489]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1081
    [9.37145][9.37145:37180]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1113
    [9.596][9.596:631]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1134
    [9.38690][9.38690:38725]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1161
    [9.40289][9.40289:40324]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1189
    [9.42159][9.42159:42194]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1216
    [9.44139][9.44139:44174]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1249
    [9.46546][9.46546:46581]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1280
    [9.1691][9.1691:1726]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1301
    [9.47994][9.47994:48029]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1328
    [9.427][9.427:462]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1349
    [9.49539][9.49539:49574]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1376
    [9.51223][9.51223:51258]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1405
    [9.53079][9.53079:53114]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1431
    [9.54424][9.54424:54459]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1455
    [9.55606][9.55606:55641]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1483
    [9.57342][9.57342:57377]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1509
    [9.58968][9.58968:59003]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1537
    [9.60645][9.60645:60680]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1559
    [9.62123][9.62123:62158]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1577
    [9.63304][9.63304:63339]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1606
    [9.65030][9.65030:65065]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1634
    [9.66760][9.66760:66795]()
    Editor_state.screen_bottom1 = {}
  • replacement in source_text_tests.lua at line 1644
    [9.67421][9.3116:3175]()
    edit.run_after_keychord(Editor_state, 'right', 'right')
    [9.67421]
    [9.16333]
    edit.run_after_keychord(Editor_state, 'right', 'right')
  • edit in source_text_tests.lua at line 1663
    [9.68570][9.68570:68605]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1691
    [9.70220][9.70220:70255]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1721
    [9.71991][9.71991:72026]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1754
    [9.74104][9.74104:74139]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1781
    [9.75586][9.75586:75621]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1915
    [9.77676][9.77676:77711]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1949
    [9.79164][9.79164:79199]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 1987
    [9.20140][9.20140:20175]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 2007
    [9.80671][9.80671:80706]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 2033
    [9.81843][9.81843:81878]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 2050
    [9.82577][9.82577:82612]()
    Editor_state.screen_bottom1 = {}
  • edit in source_text_tests.lua at line 2067
    [9.83311][9.83311:83346]()
    Editor_state.screen_bottom1 = {}
  • replacement in source_text.lua at line 5
    [9.84027][9.48:128]()
    -- return y for the next line, and position of start of final screen line drawn
    [9.84027]
    [9.8]
    -- return y for the next line
  • edit in source_text.lua at line 9
    [9.84250][9.84250:84274]()
    line_cache.starty = y
  • edit in source_text.lua at line 11
    [9.1129][9.129:205]()
    local final_screen_line_starting_pos = startpos -- track value to return
  • edit in source_text.lua at line 25
    [9.87831][9.413:456]()
    final_screen_line_starting_pos = pos
  • replacement in source_text.lua at line 84
    [9.89166][9.1942:1985]()
    return y, final_screen_line_starting_pos
    [9.89166]
    [9.1985]
    return y
  • replacement in source_text.lua at line 208
    [9.97366][9.97366:97517]()
    --? print(State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos, State.screen_bottom1.line, State.screen_bottom1.pos)
    [9.97366]
    [9.97517]
    --? print(State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos)
  • replacement in source_text.lua at line 241
    [9.99416][9.99416:99569]()
    --? print(State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos, State.screen_bottom1.line, State.screen_bottom1.pos)
    [9.99416]
    [9.99569]
    --? print(State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos)
  • replacement in source_text.lua at line 246
    [9.99822][9.99822:99983]()
    --? print('=>', State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos, State.screen_bottom1.line, State.screen_bottom1.pos)
    [9.99822]
    [9.99983]
    --? print('=>', State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos)
  • replacement in source_text.lua at line 427
    [9.107562][9.107562:107584]()
    --? print('pageup')
    [9.107562]
    [9.107584]
    State.screen_top1 = Text.previous_screen_top1(State)
    State.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}
    Text.move_cursor_down_to_next_text_line_while_scrolling_again_if_necessary(State)
    Text.redraw_all(State) -- if we're scrolling, reclaim all fragments to avoid memory leaks
    end
    -- return the top y coordinate of a given line_index,
    -- or nil if no part of it is on screen
    function Text.starty(State, line_index)
  • replacement in source_text.lua at line 437
    [9.107625][9.107625:107706]()
    local top2 = Text.to2(State, State.screen_top1)
    --? print(App.screen.height)
    [9.107625]
    [9.107706]
    -- does not modify State (except to populate line_cache)
    if line_index < State.screen_top1.line then return end
    local loc2 = Text.to2(State, State.screen_top1)
    local y = State.top
    while true do
    if State.lines[loc2.line].mode == 'drawing' then
    y = y + Drawing_padding_top
    end
    if loc2.line == line_index then return y end
    if State.lines[loc2.line].mode == 'text' then
    y = y + State.line_height
    elseif State.lines[loc2.line].mode == 'drawing' then
    y = y + Drawing.pixels(State.lines[loc2.line].h, State.width) + Drawing_padding_bottom
    end
    if y + State.line_height > App.screen.height then break end
    local next_loc2 = Text.next_screen_line(State, loc2)
    if Text.eq2(next_loc2, loc2) then break end -- end of file
    loc2 = next_loc2
    end
    end
    function Text.previous_screen_top1(State)
    -- duplicate some logic from love.draw
    -- does not modify State (except to populate line_cache)
    local loc2 = Text.to2(State, State.screen_top1)
  • replacement in source_text.lua at line 464
    [9.107782][9.107782:107845](),[9.107845][9.3441:3522](),[9.3522][9.5040:5103](),[9.107952][9.5040:5103]()
    --? print(y, top2.line, top2.screen_line, top2.screen_pos)
    if State.screen_top1.line == 1 and State.screen_top1.pos == 1 then break end
    if State.lines[State.screen_top1.line].mode == 'text' then
    [9.107782]
    [9.5103]
    if loc2.line == 1 and loc2.screen_line == 1 and loc2.screen_pos == 1 then break end
    if State.lines[loc2.line].mode == 'text' then
  • replacement in source_text.lua at line 467
    [9.5135][9.5135:5311]()
    elseif State.lines[State.screen_top1.line].mode == 'drawing' then
    y = y - Drawing_padding_height - Drawing.pixels(State.lines[State.screen_top1.line].h, State.width)
    [9.5135]
    [9.5311]
    elseif State.lines[loc2.line].mode == 'drawing' then
    y = y - Drawing_padding_height - Drawing.pixels(State.lines[loc2.line].h, State.width)
  • replacement in source_text.lua at line 470
    [9.5319][9.107982:108032](),[9.107982][9.107982:108032]()
    top2 = Text.previous_screen_line(State, top2)
    [9.5319]
    [9.108032]
    loc2 = Text.previous_screen_line(State, loc2)
  • replacement in source_text.lua at line 472
    [9.108038][9.108038:108082](),[9.108082][9.3523:3598](),[9.3598][9.108186:108394](),[9.108186][9.108186:108394]()
    State.screen_top1 = Text.to1(State, top2)
    State.cursor1 = {line=State.screen_top1.line, pos=State.screen_top1.pos}
    Text.move_cursor_down_to_next_text_line_while_scrolling_again_if_necessary(State)
    --? print(State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos)
    --? print('pageup end')
    [9.108038]
    [9.108394]
    return Text.to1(State, loc2)
  • replacement in source_text.lua at line 476
    [9.108429][9.108429:108453](),[9.108453][9.9:94](),[9.94][9.108728:108805](),[9.108728][9.108728:108805]()
    --? print('pagedown')
    State.screen_top1 = {line=State.screen_bottom1.line, pos=State.screen_bottom1.pos}
    --? print('setting top to', State.screen_top1.line, State.screen_top1.pos)
    [9.108429]
    [9.3945]
    State.screen_top1 = Text.screen_bottom1(State)
  • edit in source_text.lua at line 479
    [9.108993][9.108993:109040]()
    --? print('top now', State.screen_top1.line)
  • replacement in source_text.lua at line 480
    [9.109133][9.109133:109161]()
    --? print('pagedown end')
    [9.109133]
    [9.109161]
    end
    -- return the location of the start of the bottom-most line on screen
    function Text.screen_bottom1(State)
    -- duplicate some logic from love.draw
    -- does not modify State (except to populate line_cache)
    local loc2 = Text.to2(State, State.screen_top1)
    local y = State.top
    while true do
    if State.lines[loc2.line].mode == 'text' then
    y = y + State.line_height
    elseif State.lines[loc2.line].mode == 'drawing' then
    y = y + Drawing_padding_height + Drawing.pixels(State.lines[loc2.line].h, State.width)
    end
    if y + State.line_height > App.screen.height then break end
    local next_loc2 = Text.next_screen_line(State, loc2)
    if Text.eq2(next_loc2, loc2) then break end
    loc2 = next_loc2
    end
    return Text.to1(State, loc2)
  • replacement in source_text.lua at line 547
    [9.1324][9.114899:115058](),[9.7527][9.114899:115058](),[9.114899][9.114899:115058]()
    --? print('down', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos, State.screen_bottom1.line, State.screen_bottom1.pos)
    [9.1324]
    [9.1325]
    --? print('down', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos)
  • replacement in source_text.lua at line 564
    [9.115473][9.115473:115532]()
    if State.cursor1.line > State.screen_bottom1.line then
    [9.115473]
    [9.115532]
    local screen_bottom1 = Text.screen_bottom1(State)
    --? print('down 2', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos, screen_bottom1.line, screen_bottom1.pos)
    if State.cursor1.line > screen_bottom1.line then
  • replacement in source_text.lua at line 574
    [9.4302][9.115896:115966](),[9.115896][9.115896:115966]()
    local scroll_down = Text.le1(State.screen_bottom1, State.cursor1)
    [9.4302]
    [9.115966]
    local screen_bottom1 = Text.screen_bottom1(State)
    local scroll_down = Text.le1(screen_bottom1, State.cursor1)
  • replacement in source_text.lua at line 591
    [9.118244][9.118244:118401]()
    --? print('=>', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos, State.screen_bottom1.line, State.screen_bottom1.pos)
    [9.118244]
    [9.118401]
    --? print('=>', State.cursor1.line, State.cursor1.pos, State.screen_top1.line, State.screen_top1.pos)
  • edit in source_text.lua at line 728
    [9.3828]
    [9.3828]
    assert(State.lines[loc1.line].mode == 'text')
  • edit in source_text.lua at line 740
    [9.1819]
    [9.4246]
    end
    function Text.final_text_loc_on_screen(State)
    local screen_bottom1 = Text.screen_bottom1(State)
    if State.lines[screen_bottom1.line].mode == 'text' then
    return {
    line=screen_bottom1.line,
    pos=Text.pos_at_end_of_screen_line(State, screen_bottom1),
    }
    end
    local loc2 = Text.to2(State, screen_bottom1)
    while true do
    if State.lines[loc2.line].mode == 'text' then break end
    assert(loc2.line > 1 or loc2.screen_line > 1 and loc2.screen_pos > 1) -- elsewhere we're making sure there's always at least one text line on screen
    loc2 = Text.previous_screen_line(State, loc2)
    end
    local result = Text.to1(State, loc2)
    result.pos = Text.pos_at_end_of_screen_line(State, result)
    return result
  • replacement in source_text.lua at line 801
    [9.5213][9.5213:5372]()
    --? print('snap', State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos, State.screen_bottom1.line, State.screen_bottom1.pos)
    [9.5213]
    [9.127630]
    --? print('snap', State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos)
  • replacement in source_text.lua at line 831
    [9.128406][9.5446:5608]()
    --? print('snap =>', State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos, State.screen_bottom1.line, State.screen_bottom1.pos)
    [9.128406]
    [9.128639]
    --? print('snap =>', State.screen_top1.line, State.screen_top1.pos, State.cursor1.line, State.cursor1.pos)
  • replacement in source_text.lua at line 838
    [9.128885][9.128885:129011]()
    if line_cache.starty == nil then return false end -- outside current page
    if y < line_cache.starty then return false end
    [9.128885]
    [9.5609]
    local starty = Text.starty(State, line_index)
    if starty == nil then return false end -- outside current page
    if y < starty then return false end
  • replacement in source_text.lua at line 842
    [9.5669][9.5669:5846]()
    return y < line_cache.starty + State.line_height*(#line_cache.screen_line_starting_pos - Text.screen_line_index(line_cache.screen_line_starting_pos, line_cache.startpos) + 1)
    [9.5669]
    [9.130281]
    return y < starty + State.line_height*(#line_cache.screen_line_starting_pos - Text.screen_line_index(line_cache.screen_line_starting_pos, line_cache.startpos) + 1)
  • replacement in source_text.lua at line 849
    [9.130948][9.2105:2172]()
    assert(my >= line_cache.starty, 'failed to map y pixel to line')
    [9.130948]
    [9.130982]
    local starty = Text.starty(State, line_index)
    assert(my >= starty, 'failed to map y pixel to line')
  • replacement in source_text.lua at line 852
    [9.131023][9.131023:131053]()
    local y = line_cache.starty
    [9.131023]
    [9.5847]
    local y = starty
  • edit in source_text.lua at line 1036
    [9.7111]
    [9.142162]
    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
  • edit in source_text.lua at line 1065
    [9.144279]
    [9.144721]
    function Text.next_screen_line(State, loc2)
    if State.lines[loc2.line].mode == 'drawing' then
    return {line=loc2.line+1, screen_line=1, screen_pos=1}
    end
    Text.populate_screen_line_starting_pos(State, loc2.line)
    if loc2.screen_line >= #State.line_cache[loc2.line].screen_line_starting_pos then
    if loc2.line < #State.lines then
    return {line=loc2.line+1, screen_line=1, screen_pos=1}
    else
    return loc2
    end
    else
    return {line=loc2.line, screen_line=loc2.screen_line+1, screen_pos=1}
    end
    end
  • edit in source_text.lua at line 1104
    [9.145573]
    [9.145573]
    local screen_bottom1 = Text.screen_bottom1(State)
  • replacement in source_text.lua at line 1107
    [9.145703][9.145703:145790]()
    elseif State.cursor1.line >= State.screen_bottom1.line then
    --? print('too low')
    [9.145703]
    [9.145790]
    elseif State.cursor1.line >= screen_bottom1.line then
  • replacement in source_text.lua at line 1109
    [9.145835][9.145835:145860](),[9.145860][9.7383:7562]()
    --? print('tweak')
    State.cursor1 = {
    line=State.screen_bottom1.line,
    pos=Text.to_pos_on_line(State, State.screen_bottom1.line, State.right-5, App.screen.height-5),
    }
    [9.145835]
    [9.146048]
    State.cursor1 = Text.final_text_loc_on_screen(State)
  • edit in source_text.lua at line 1118
    [9.146203][9.146203:146513]()
    -- this approach is cheaper and almost works, except on the final screen
    -- where file ends above bottom of screen
    --? local botpos = Text.pos_at_start_of_screen_line(State, State.cursor1)
    --? local botline1 = {line=State.cursor1.line, pos=botpos}
    --? return Text.lt1(State.screen_bottom1, botline1)
  • edit in source_edit.lua at line 36
    [9.17256][9.17256:17321]()
    -- a (y) coord in pixels (updated while painting screen),
  • edit in source_edit.lua at line 56
    [9.153568][9.153568:153638]()
    -- starty, the y coord in pixels the line starts rendering from
  • edit in source_edit.lua at line 69
    [9.154525]
    [9.8099]
    --
    -- On lines that are drawings, pos will be nil.
  • replacement in source_edit.lua at line 72
    [9.8188][9.8188:8337]()
    cursor1 = {line=1, pos=1}, -- position of cursor
    screen_bottom1 = {line=1, pos=1}, -- position of start of screen line at bottom of screen
    [9.8188]
    [9.23290]
    cursor1 = {line=1, pos=1}, -- position of cursor; must be on a text line
  • edit in source_edit.lua at line 167
    [9.155825][9.4256:4301]()
    local screen_bottom1 = {line=nil, pos=nil}
  • edit in source_edit.lua at line 172
    [9.156055][9.4302:4339]()
    screen_bottom1.line = line_index
  • replacement in source_edit.lua at line 198
    [9.156405][9.964:1068]()
    y, screen_bottom1.pos = Text.draw(State, line_index, y, startpos, hide_cursor, show_line_numbers)
    [9.156405]
    [9.19795]
    y = Text.draw(State, line_index, y, startpos, hide_cursor, show_line_numbers)
  • edit in source_edit.lua at line 208
    [9.156588][9.4426:4466]()
    State.screen_bottom1 = screen_bottom1
  • replacement in source_edit.lua at line 280
    [9.20456][9.20456:20591]()
    local line_cache = State.line_cache[line_index]
    if Drawing.in_drawing(line, line_cache, x, y, State.left,State.right) then
    [9.20456]
    [9.20591]
    if Drawing.in_drawing(State, line_index, x, y, State.left,State.right) then
  • replacement in source_edit.lua at line 294
    [9.5131][9.5131:5267]()
    State.selection1 = {
    line=State.screen_bottom1.line,
    pos=Text.pos_at_end_of_screen_line(State, State.screen_bottom1),
    }
    [9.5131]
    [9.157756]
    State.selection1 = Text.final_text_loc_on_screen(State)
  • replacement in source_edit.lua at line 332
    [9.1298][9.1298:1429]()
    State.cursor1.line, State.cursor1.pos = State.screen_bottom1.line, Text.pos_at_end_of_screen_line(State, State.screen_bottom1)
    [9.1298]
    [9.1429]
    State.cursor1 = Text.final_text_loc_on_screen(State)
  • replacement in source_edit.lua at line 360
    [9.241][9.241:324]()
    State.cursor1 = {line=State.screen_bottom1.line, pos=State.screen_bottom1.pos}
    [9.241]
    [9.1115]
    State.cursor1 = Text.screen_bottom1(State)
  • replacement in source_edit.lua at line 394
    [9.25659][9.11:198]()
    chord ~= 'C-a' and chord ~= 'C-c' and chord ~= 'C-x' and chord ~= 'backspace' and chord ~= 'delete' and chord ~= 'C-z' and chord ~= 'C-y' and not App.is_cursor_movement(chord) then
    [9.25659]
    [9.25793]
    chord ~= 'C-a' and chord ~= 'C-c' and chord ~= 'C-x' and chord ~= 'backspace' and chord ~= 'delete' and chord ~= 'C-z' and chord ~= 'C-y' and not App.is_cursor_movement(key) then
  • edit in source_edit.lua at line 398
    [9.158237][9.11:118]()
    for _,line_cache in ipairs(State.line_cache) do line_cache.starty = nil end -- just in case we scroll
  • edit in source_edit.lua at line 502
    [9.21853][9.21853:21895]()
    -- DON'T reset line_cache.starty here
  • edit in source_edit.lua at line 538
    [9.163191][9.163191:163298]()
    for _,line_cache in ipairs(State.line_cache) do line_cache.starty = nil end -- just in case we scroll
  • edit in source_edit.lua at line 592
    [9.6436]
    [9.165236]
    edit.draw(State)
  • edit in source.lua at line 310
    [9.6890][9.175392:175506](),[9.175392][9.175392:175506]()
    for _,line_cache in ipairs(Editor_state.line_cache) do line_cache.starty = nil end -- just in case we scroll
  • replacement in help.lua at line 3
    [9.2395][9.2395:2448]()
    local line_cache = State.line_cache[drawing_index]
    [9.2395]
    [9.2448]
    local starty = Text.starty(State, drawing_index)
  • replacement in help.lua at line 5
    [9.2472][9.2472:2505]()
    local y = line_cache.starty+10
    [9.2472]
    [9.2505]
    local y = starty+10
  • replacement in help.lua at line 51
    [9.4817][9.4817:4964]()
    love.graphics.rectangle('fill', State.left,line_cache.starty, State.width, math.max(Drawing.pixels(drawing.h, State.width),y-line_cache.starty))
    [9.4817]
    [9.4964]
    love.graphics.rectangle('fill', State.left,starty, State.width, math.max(Drawing.pixels(drawing.h, State.width),y-starty))
  • replacement in help.lua at line 56
    [9.5074][9.5074:5127]()
    local line_cache = State.line_cache[drawing_index]
    [9.5074]
    [9.5127]
    local starty = Text.starty(State, drawing_index)
  • replacement in help.lua at line 58
    [9.5151][9.5151:5184]()
    local y = line_cache.starty+10
    [9.5151]
    [9.5184]
    local y = starty+10
  • replacement in help.lua at line 132
    [9.8860][9.8860:9007]()
    love.graphics.rectangle('fill', State.left,line_cache.starty, State.width, math.max(Drawing.pixels(drawing.h, State.width),y-line_cache.starty))
    [9.8860]
    [9.9007]
    love.graphics.rectangle('fill', State.left,starty, State.width, math.max(Drawing.pixels(drawing.h, State.width),y-starty))
  • edit in help.lua at line 147
    [9.9454][9.3567:3567](),[9.120][9.3653:3704](),[9.120][9.3653:3704](),[9.313][9.3705:3727](),[9.313][9.3705:3727](),[9.349][9.3728:3853](),[9.349][9.3728:3853](),[9.461][9.3854:3905](),[9.461][9.3854:3905](),[9.374][9.3906:3928](),[9.374][9.3906:3928](),[9.410][9.3929:4054](),[9.410][9.3929:4054]()
    local starty = Text.starty(State, drawing_index)
    local y = starty+10
    love.graphics.rectangle('fill', State.left,starty, State.width, math.max(Drawing.pixels(drawing.h, State.width),y-starty))
    local starty = Text.starty(State, drawing_index)
    local y = starty+10
    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 147
    [9.9454]
    [9.9485]
  • edit in edit.lua at line 110
    [9.527][9.527:572]()
    local screen_bottom1 = {line=nil, pos=nil}
  • edit in edit.lua at line 115
    [9.802][9.802:839]()
    screen_bottom1.line = line_index
  • replacement in edit.lua at line 120
    [9.1000][9.1000:1070]()
    y, screen_bottom1.pos = Text.draw(State, line_index, y, startpos)
    [9.1000]
    [9.1070]
    y = Text.draw(State, line_index, y, startpos)
  • edit in edit.lua at line 123
    [9.1101][9.1101:1141]()
    State.screen_bottom1 = screen_bottom1
  • replacement in edit.lua at line 194
    [9.3374][9.3374:3510]()
    State.selection1 = {
    line=State.screen_bottom1.line,
    pos=Text.pos_at_end_of_screen_line(State, State.screen_bottom1),
    }
    [9.3374]
    [9.3510]
    State.selection1 = Text.final_text_loc_on_screen(State)
  • replacement in edit.lua at line 220
    [9.2196][9.2196:2325]()
    State.cursor1.line, State.cursor1.pos = State.screen_bottom1.line, Text.pos_at_end_of_screen_line(State, State.screen_bottom1)
    [9.2196]
    [9.2325]
    State.cursor1 = Text.final_text_loc_on_screen(State)
  • replacement in edit.lua at line 246
    [9.4961][9.4961:5044]()
    State.cursor1 = {line=State.screen_bottom1.line, pos=State.screen_bottom1.pos}
    [9.4961]
    [9.5044]
    State.cursor1 = Text.screen_bottom1(State)
    edit.put_cursor_on_next_text_line(State)
  • edit in edit.lua at line 274
    [9.6048][9.6048:6155]()
    for _,line_cache in ipairs(State.line_cache) do line_cache.starty = nil end -- just in case we scroll
  • edit in edit.lua at line 374
    [9.10211][9.10211:10318]()
    for _,line_cache in ipairs(State.line_cache) do line_cache.starty = nil end -- just in case we scroll
  • edit in edit.lua at line 428
    [9.11811]
    [9.11811]
    edit.draw(State)
  • edit in edit.lua at line 451
    [9.12430][5.178:178](),[9.182][9.8618:8665](),[9.182][9.8618:8665](),[9.5239][9.8565:8617](),[9.5239][9.8565:8617](),[9.8089][9.4055:4137](),[9.8089][9.4055:4137](),[9.834][9.1152:1171](),[9.834][9.1152:1171](),[9.3196][9.1094:1151](),[9.3196][9.1094:1151](),[9.2459][9.1035:1093](),[9.2459][9.1035:1093]()
    State.cursor1 = Text.screen_bottom1(State)
    y = Text.draw(State, line_index, y, startpos)
    if Drawing.in_drawing(State, line_index, x, y, State.left,State.right) then
    edit.draw(State)
    State.cursor1 = Text.final_text_loc_on_screen(State)
    State.selection1 = Text.final_text_loc_on_screen(State)
  • resolve order conflict in edit.lua at line 451
    [9.12430]
  • replacement in drawing_tests.lua at line 6
    [9.806][9.806:846]()
    App.screen.init{width=120, height=60}
    [9.762]
    [9.846]
    App.screen.init{width=800, height=600}
  • edit in drawing_tests.lua at line 16
    [9.1191][9.24354:24354](),[9.102][9.1172:1213](),[9.102][9.1172:1213]()
    App.screen.init{width=800, height=600}
  • resolve order conflict in drawing_tests.lua at line 16
    [9.1191]
    [9.48537]
  • edit in drawing_tests.lua at line 35
    [9.48768][9.48768:48866](),[9.48768][9.48768:48866]()
    check_eq(Editor_state.line_cache[1].starty, Editor_state.top+Drawing_padding_top, 'baseline/y')
  • resurrect zombie in drawing_tests.lua at line 36
    [9.4231][9.48866:48986](),[9.48866][9.48866:48986](),[9.48866][9.48866:48986]()
    check_eq(Editor_state.lines[1].h, 128, 'baseline/y')
    check_eq(#Editor_state.lines[1].shapes, 0, 'baseline/#shapes')
  • replacement in drawing_tests.lua at line 80
    [9.25253][9.25253:25351]()
    check_eq(Editor_state.line_cache[1].starty, Editor_state.top+Drawing_padding_top, 'baseline/y')
    [9.25253]
    [9.25351]
    check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y')
  • replacement in drawing_tests.lua at line 108
    [9.25857][9.25857:25955]()
    check_eq(Editor_state.line_cache[1].starty, Editor_state.top+Drawing_padding_top, 'baseline/y')
    [9.25857]
    [9.25955]
    check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y')
  • replacement in drawing_tests.lua at line 137
    [9.26467][9.26467:26565]()
    check_eq(Editor_state.line_cache[1].starty, Editor_state.top+Drawing_padding_top, 'baseline/y')
    [9.26467]
    [9.26565]
    check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y')
  • replacement in drawing_tests.lua at line 175
    [9.26921][9.26921:27019]()
    check_eq(Editor_state.line_cache[1].starty, Editor_state.top+Drawing_padding_top, 'baseline/y')
    [9.26921]
    [9.27019]
    check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y')
  • replacement in drawing_tests.lua at line 203
    [9.27531][9.27531:27629]()
    check_eq(Editor_state.line_cache[1].starty, Editor_state.top+Drawing_padding_top, 'baseline/y')
    [9.27531]
    [9.27629]
    check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y')
  • replacement in drawing_tests.lua at line 234
    [9.28300][9.28300:28398]()
    check_eq(Editor_state.line_cache[1].starty, Editor_state.top+Drawing_padding_top, 'baseline/y')
    [9.28300]
    [9.28398]
    check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y')
  • replacement in drawing_tests.lua at line 272
    [9.29066][9.29066:29164]()
    check_eq(Editor_state.line_cache[1].starty, Editor_state.top+Drawing_padding_top, 'baseline/y')
    [9.29066]
    [9.29164]
    check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y')
  • replacement in drawing_tests.lua at line 316
    [9.29933][9.29933:30031]()
    check_eq(Editor_state.line_cache[1].starty, Editor_state.top+Drawing_padding_top, 'baseline/y')
    [9.29933]
    [9.30031]
    check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y')
  • replacement in drawing_tests.lua at line 352
    [9.30648][9.30648:30746]()
    check_eq(Editor_state.line_cache[1].starty, Editor_state.top+Drawing_padding_top, 'baseline/y')
    [9.30648]
    [9.30746]
    check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y')
  • edit in drawing_tests.lua at line 398
    [9.24482][9.5415:5415](),[9.49651][9.4232:4325](),[9.49651][9.4232:4325](),[9.50255][9.4326:4419](),[9.50255][9.4326:4419](),[9.50865][9.4420:4513](),[9.50865][9.4420:4513](),[9.51319][9.4514:4607](),[9.51319][9.4514:4607](),[9.51929][9.4608:4701](),[9.51929][9.4608:4701](),[9.52698][9.4702:4795](),[9.52698][9.4702:4795](),[9.53464][9.4796:4889](),[9.53464][9.4796:4889](),[9.54331][9.4890:4983](),[9.54331][9.4890:4983](),[9.55046][9.4984:5077](),[9.55046][9.4984:5077]()
    check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y')
    check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y')
    check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y')
    check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y')
    check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y')
    check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y')
    check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y')
    check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y')
    check_eq(Text.starty(Editor_state, 1), Editor_state.top+Drawing_padding_top, 'baseline/y')
  • resolve order conflict in drawing_tests.lua at line 398
    [9.24482]
    [9.55732]
  • edit in drawing.lua at line 9
    [9.10263][9.10263:10337]()
    local line_cache = State.line_cache[line_index]
    line_cache.starty = y
  • replacement in drawing.lua at line 10
    [9.10384][9.10384:10504]()
    if pmx < State.right and pmy > line_cache.starty and pmy < line_cache.starty+Drawing.pixels(line.h, State.width) then
    [9.10384]
    [9.10504]
    local starty = Text.starty(State, line_index)
    if pmx < State.right and pmy > starty and pmy < starty+Drawing.pixels(line.h, State.width) then
  • replacement in drawing.lua at line 13
    [9.10530][9.10530:10645]()
    love.graphics.rectangle('line', State.left,line_cache.starty, State.width,Drawing.pixels(line.h, State.width))
    [9.10530]
    [9.10645]
    love.graphics.rectangle('line', State.left,starty, State.width,Drawing.pixels(line.h, State.width))
  • replacement in drawing.lua at line 15
    [9.10690][9.10690:10766]()
    icon[State.current_drawing_mode](State.right-22, line_cache.starty+4)
    [9.10690]
    [9.10766]
    icon[State.current_drawing_mode](State.right-22, starty+4)
  • replacement in drawing.lua at line 17
    [9.10775][9.10775:10852]()
    icon[State.previous_drawing_mode](State.right-22, line_cache.starty+4)
    [9.10775]
    [9.10852]
    icon[State.previous_drawing_mode](State.right-22, starty+4)
  • replacement in drawing.lua at line 32
    [9.11157][9.11157:11220]()
    local my = Drawing.coord(pmy-line_cache.starty, State.width)
    [9.11157]
    [9.11220]
    local my = Drawing.coord(pmy-starty, State.width)
  • replacement in drawing.lua at line 40
    [9.11408][9.11408:11487]()
    Drawing.draw_shape(line, shape, line_cache.starty, State.left,State.right)
    [9.11408]
    [9.11487]
    Drawing.draw_shape(line, shape, starty, State.left,State.right)
  • replacement in drawing.lua at line 44
    [9.11570][9.11570:11653]()
    local function py(y) return Drawing.pixels(y, State.width)+line_cache.starty end
    [9.11570]
    [9.11653]
    local function py(y) return Drawing.pixels(y, State.width)+starty end
  • replacement in drawing.lua at line 73
    [9.12713][9.12713:12791]()
    Drawing.draw_pending_shape(line, line_cache.starty, State.left,State.right)
    [9.12713]
    [9.12791]
    Drawing.draw_pending_shape(line, starty, State.left,State.right)
  • edit in drawing.lua at line 126
    [9.14879][9.8837:8837](),[9.1580][9.5078:5224](),[9.1580][9.5078:5224](),[9.1052][9.5225:5329](),[9.1052][9.5225:5329](),[9.363][9.5330:5395](),[9.363][9.5330:5395](),[9.532][9.5396:5462](),[9.532][9.5396:5462](),[9.73][9.5463:5515](),[9.73][9.5463:5515](),[9.1083][9.5516:5584](),[9.1083][9.5516:5584](),[9.93][9.5585:5657](),[9.93][9.5585:5657](),[9.1279][9.5658:5725](),[9.1279][9.5658:5725]()
    local starty = Text.starty(State, line_index)
    if pmx < State.right and pmy > starty and pmy < starty+Drawing.pixels(line.h, State.width) then
    love.graphics.rectangle('line', State.left,starty, State.width,Drawing.pixels(line.h, State.width))
    icon[State.current_drawing_mode](State.right-22, starty+4)
    icon[State.previous_drawing_mode](State.right-22, starty+4)
    local my = Drawing.coord(pmy-starty, State.width)
    Drawing.draw_shape(line, shape, starty, State.left,State.right)
    local function py(y) return Drawing.pixels(y, State.width)+starty end
    Drawing.draw_pending_shape(line, starty, State.left,State.right)
  • resolve order conflict in drawing.lua at line 126
    [9.14879]
    [9.7397]
  • edit in drawing.lua at line 209
    [9.18373][9.18373:18669]()
    end
    function Drawing.in_drawing(drawing, line_cache, x,y, left,right)
    if line_cache.starty == nil then return false end -- outside current page
    local width = right-left
    return y >= line_cache.starty and y < line_cache.starty + Drawing.pixels(drawing.h, width) and x >= left and x < right
  • edit in drawing.lua at line 211
    [9.18674][9.8906:8906]()
  • resurrect zombie in drawing.lua at line 211
    [9.646][9.5726:6150](),[9.646][9.5726:6150](),[9.5462][9.6151:6250](),[9.5462][9.6151:6250]()
    function Drawing.in_current_drawing(State, x,y, left,right)
    return Drawing.in_drawing(State, State.lines.current_drawing_index, x,y, left,right)
    end
    function Drawing.in_drawing(State, line_index, x,y, left,right)
    assert(State.lines[line_index].mode == 'drawing')
    local starty = Text.starty(State, line_index)
    if starty == nil then return false end -- outside current page
    local drawing = State.lines[line_index]
    return y >= starty and y < starty + Drawing.pixels(drawing.h, width) and x >= left and x < right
  • resolve order conflict in drawing.lua at line 211
    [9.18674]
    [9.5726]
  • edit in drawing.lua at line 220
    [9.6150]
    [9.6151]
    local width = right-left
  • edit in drawing.lua at line 222
    [9.6250]
    [9.883]
    end
  • replacement in drawing.lua at line 226
    [9.18720][9.18720:18773]()
    local line_cache = State.line_cache[drawing_index]
    [9.18720]
    [9.18773]
    local starty = Text.starty(State, drawing_index)
  • replacement in drawing.lua at line 228
    [9.18827][9.18827:18888]()
    local cy = Drawing.coord(y-line_cache.starty, State.width)
    [9.18827]
    [9.18888]
    local cy = Drawing.coord(y-starty, State.width)
  • edit in drawing.lua at line 241
    [9.2735][9.6251:6302](),[9.2735][9.6251:6302](),[9.71][9.6303:6353](),[9.71][9.6303:6353]()
    local starty = Text.starty(State, drawing_index)
    local cy = Drawing.coord(y-starty, State.width)
  • resolve order conflict in drawing.lua at line 241
    [9.19797]
    [9.7423]
  • replacement in drawing.lua at line 253
    [9.20157][9.20157:20230](),[9.20230][9.1480:1515]()
    local line_cache = State.line_cache[State.lines.current_drawing_index]
    if line_cache.starty == nil then
    [9.20157]
    [9.1515]
    local starty = Text.starty(State, State.lines.current_drawing_index)
    if starty == nil then
  • replacement in drawing.lua at line 263
    [9.20370][9.20370:20433]()
    local my = Drawing.coord(pmy-line_cache.starty, State.width)
    [9.20370]
    [9.20433]
    local my = Drawing.coord(pmy-starty, State.width)
  • replacement in drawing.lua at line 265
    [9.20461][9.20461:20546]()
    if Drawing.in_drawing(drawing, line_cache, pmx,pmy, State.left,State.right) then
    [9.20461]
    [9.20546]
    if Drawing.in_current_drawing(State, pmx,pmy, State.left,State.right) then
  • replacement in drawing.lua at line 275
    [9.20939][9.20939:21025]()
    if Drawing.in_drawing(drawing, line_cache, pmx, pmy, State.left,State.right) then
    [9.20939]
    [9.21025]
    if Drawing.in_current_drawing(State, pmx, pmy, State.left,State.right) then
  • edit in drawing.lua at line 303
    [9.21692][9.9069:9069](),[9.179][9.6354:6449](),[9.179][9.6354:6449](),[9.179][9.6354:6449](),[9.134][9.6450:6502](),[9.134][9.6450:6502](),[9.1613][9.6503:6582](),[9.1613][9.6503:6582](),[9.457][9.6583:6663](),[9.457][9.6583:6663]()
    local starty = Text.starty(State, State.lines.current_drawing_index)
    if starty == nil then
    local my = Drawing.coord(pmy-starty, State.width)
    if Drawing.in_current_drawing(State, pmx,pmy, State.left,State.right) then
    if Drawing.in_current_drawing(State, pmx, pmy, State.left,State.right) then
  • resolve order conflict in drawing.lua at line 303
    [9.21692]
    [9.7466]
  • replacement in drawing.lua at line 313
    [9.22064][9.22064:22139]()
    local line_cache = State.line_cache[State.lines.current_drawing_index]
    [9.22064]
    [9.22139]
    local starty = Text.starty(State, State.lines.current_drawing_index)
  • replacement in drawing.lua at line 322
    [9.22495][9.22495:22607]()
    local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-line_cache.starty, State.width)
    [9.22495]
    [9.22607]
    local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width)
  • replacement in drawing.lua at line 329
    [9.22947][9.22947:23059]()
    local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-line_cache.starty, State.width)
    [9.22947]
    [9.23059]
    local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width)
  • replacement in drawing.lua at line 337
    [9.23470][9.23470:23594]()
    App.mouse_move(State.left+Drawing.pixels(p2.x, State.width), line_cache.starty+Drawing.pixels(p2.y, State.width))
    [9.23470]
    [9.23594]
    App.mouse_move(State.left+Drawing.pixels(p2.x, State.width), starty+Drawing.pixels(p2.y, State.width))
  • replacement in drawing.lua at line 341
    [9.23714][9.23714:23826]()
    local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-line_cache.starty, State.width)
    [9.23714]
    [9.23826]
    local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width)
  • replacement in drawing.lua at line 349
    [9.24225][9.24225:24339]()
    local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-line_cache.starty, State.width)
    [9.24225]
    [9.24339]
    local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width)
  • replacement in drawing.lua at line 364
    [9.25207][9.25207:25321]()
    local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-line_cache.starty, State.width)
    [9.25207]
    [9.25321]
    local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width)
  • replacement in drawing.lua at line 375
    [9.26037][9.26037:26149]()
    local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-line_cache.starty, State.width)
    [9.26037]
    [9.26149]
    local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width)
  • replacement in drawing.lua at line 382
    [9.26475][9.26475:26587]()
    local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-line_cache.starty, State.width)
    [9.26475]
    [9.26587]
    local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width)
  • edit in drawing.lua at line 399
    [9.27152][9.9377:9377](),[9.487][9.6664:6737](),[9.487][9.6664:6737](),[9.227][9.6738:6839](),[9.227][9.6738:6839](),[9.627][9.6840:6941](),[9.627][9.6840:6941](),[9.1032][9.6942:7055](),[9.1032][9.6942:7055](),[9.1231][9.7056:7157](),[9.1231][9.7056:7157](),[9.1668][9.7158:7261](),[9.1668][9.7158:7261](),[9.2366][9.7262:7365](),[9.2366][9.7262:7365](),[9.2970][9.7366:7467](),[9.2970][9.7366:7467](),[9.3348][9.7468:7569](),[9.3348][9.7468:7569]()
    local starty = Text.starty(State, State.lines.current_drawing_index)
    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)
    App.mouse_move(State.left+Drawing.pixels(p2.x, State.width), starty+Drawing.pixels(p2.y, State.width))
    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)
    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)
    local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width)
  • resolve order conflict in drawing.lua at line 399
    [9.27152]
    [9.7524]
  • replacement in drawing.lua at line 486
    [9.31955][9.31955:32151]()
    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)
    [9.31955]
    [9.32151]
    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)
  • replacement in drawing.lua at line 492
    [9.32415][9.32415:32611]()
    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)
    [9.32415]
    [9.32611]
    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)
  • replacement in drawing.lua at line 503
    [9.33022][9.33022:33086]()
    local _,drawing,line_cache = Drawing.current_drawing(State)
    [9.33022]
    [9.33086]
    local drawing_index,drawing = Drawing.current_drawing(State)
    local starty = Text.starty(State, drawing_index)
  • replacement in drawing.lua at line 506
    [9.33119][9.33119:33251]()
    local mx,my = Drawing.coord(App.mouse_x()-State.left, State.width), Drawing.coord(App.mouse_y()-line_cache.starty, State.width)
    [9.33119]
    [9.33251]
    local mx,my = Drawing.coord(App.mouse_x()-State.left, State.width), Drawing.coord(App.mouse_y()-starty, State.width)
  • replacement in drawing.lua at line 522
    [9.34209][9.34209:34295]()
    local drawing_index,drawing,line_cache,i,p = Drawing.select_point_at_mouse(State)
    [9.34209]
    [9.34295]
    local drawing_index,drawing,_,i,p = Drawing.select_point_at_mouse(State)
  • replacement in drawing.lua at line 533
    [9.34740][9.34740:34836]()
    local drawing_index,drawing,line_cache,point_index,p = Drawing.select_point_at_mouse(State)
    [9.34740]
    [9.34836]
    local drawing_index,drawing,_,point_index,p = Drawing.select_point_at_mouse(State)
  • replacement in drawing.lua at line 631
    [9.38422][9.38422:38610]()
    local line_cache = State.line_cache[drawing_index]
    if Drawing.in_drawing(drawing, line_cache, x,y, State.left,State.right) then
    return drawing_index,drawing,line_cache
    [9.38422]
    [9.38610]
    if Drawing.in_drawing(State, drawing_index, x,y, State.left,State.right) then
    return drawing_index,drawing
  • replacement in drawing.lua at line 643
    [9.38838][9.38838:39090]()
    local line_cache = State.line_cache[drawing_index]
    if Drawing.in_drawing(drawing, line_cache, x,y, State.left,State.right) then
    local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-line_cache.starty, State.width)
    [9.38838]
    [9.39090]
    local starty = Text.starty(State, drawing_index)
    if Drawing.in_drawing(State, drawing_index, x,y, State.left,State.right) then
    local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width)
  • replacement in drawing.lua at line 648
    [9.39218][9.39218:39264]()
    return drawing,line_cache,i,shape
    [9.39218]
    [9.39264]
    return drawing,starty,i,shape
  • replacement in drawing.lua at line 660
    [9.39505][9.39505:39757]()
    local line_cache = State.line_cache[drawing_index]
    if Drawing.in_drawing(drawing, line_cache, x,y, State.left,State.right) then
    local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-line_cache.starty, State.width)
    [9.39505]
    [9.39757]
    local starty = Text.starty(State, drawing_index)
    if Drawing.in_drawing(State, drawing_index, x,y, State.left,State.right) then
    local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width)
  • replacement in drawing.lua at line 665
    [9.39888][9.39888:39948]()
    return drawing_index,drawing,line_cache,i,point
    [9.39888]
    [9.39948]
    return drawing_index,drawing,starty,i,point
  • replacement in drawing.lua at line 677
    [9.40191][9.40191:40331]()
    local line_cache = State.line_cache[drawing_index]
    if Drawing.in_drawing(drawing, line_cache, x,y, State.left,State.right) then
    [9.40191]
    [9.40331]
    if Drawing.in_drawing(State, drawing_index, x,y, State.left,State.right) then
  • edit in drawing.lua at line 751
    [9.42200][9.3679:3679](),[9.690][9.7570:7809](),[9.690][9.7570:7809](),[9.936][9.7810:8049](),[9.936][9.7810:8049](),[9.1177][9.8050:8168](),[9.1177][9.8050:8168](),[9.7258][9.8169:8290](),[9.7258][9.8169:8290](),[9.2665][9.8291:8368](),[9.2665][9.8291:8368](),[9.2771][9.8369:8456](),[9.2771][9.8369:8456](),[9.19238][9.8457:8578](),[9.19238][9.8457:8578](),[9.4159][9.8579:8819](),[9.4159][9.8579:8819](),[9.19928][9.8820:8862](),[9.19928][9.8820:8862](),[9.4208][9.8863:9103](),[9.4208][9.8863:9103](),[9.8465][9.9104:9160](),[9.8465][9.9104:9160](),[9.4257][9.9161:9245](),[9.4257][9.9161:9245]()
    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)
    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)
    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)
    local drawing_index,drawing,_,i,p = Drawing.select_point_at_mouse(State)
    local drawing_index,drawing,_,point_index,p = Drawing.select_point_at_mouse(State)
    if Drawing.in_drawing(State, drawing_index, x,y, State.left,State.right) then
    return drawing_index,drawing
    local starty = Text.starty(State, drawing_index)
    if Drawing.in_drawing(State, drawing_index, x,y, State.left,State.right) then
    local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width)
    return drawing,starty,i,shape
    local starty = Text.starty(State, drawing_index)
    if Drawing.in_drawing(State, drawing_index, x,y, State.left,State.right) then
    local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-starty, State.width)
    return drawing_index,drawing,starty,i,point
    if Drawing.in_drawing(State, drawing_index, x,y, State.left,State.right) then
  • resolve order conflict in drawing.lua at line 751
    [9.42200]
  • edit in README.md at line 56
    [9.204][9.1214:1456](),[9.204][9.1214:1456]()
    * If you ever see a crash when clicking on the mouse, it might be because a
    mouse press and release need to happen in separate frames. Try pressing and
    releasing more slowly and let me know if that helps or not. This is klunky,
    sorry.