resolve conflicts

akkartik
Jan 22, 2024, 4:18 PM
TOXPJJYYZY7QRCVXJJDGDAM7NBSHEXNPRW5X4THW55FTSIZ3GKVQC

Dependencies

  • [2] TACI4LU6 Merge lines.love
  • [3] MX7YD2WC resolve conflicts
  • [4] 7JEYXICU resolve conflicts
  • [5] QMRQL2FO resolve conflicts
  • [6] 4HAEKSJV don't save settings on error in source editor
  • [7] AQMZJXUR use editor state font for width calculations
  • [8] P4376EXK add state arg to few functions
  • [9] QYIFOHW3 first test!
  • [10] BOFNXP5G clicking now moves the cursor even on long, wrapped lines
  • [11] V5MJRFOZ bugfix: down arrow doesn't scroll up unnecessarily
  • [12] 4YDBYBA4 clean up memory leak experiments
  • [13] 4SR3Z4Y3 document the version of LÖVE I've been using
  • [14] KV7GGVER couple of accidental globals
  • [15] ASP5RVZA Merge lines.love
  • [16] 5L7K4GBD clicking to the right of a wrapped line
  • [17] VP5KC4XZ Merge lines.love
  • [18] FS2ITYYH record a known issue
  • [19] I64IPGJX avoid saving fragments in lines
  • [20] B4FAIVRA Merge lines.love
  • [21] ZLJYLPOT Merge lines.love
  • [22] OTIBCAUJ love2d scaffold
  • [23] AJB4LFRB try to maintain a reasonable line width
  • [24] 2L4DL7PG go through App in a couple more places
  • [25] OI4FPFIN support drawings in the source editor
  • [26] RU4HIK43 Merge lines.love
  • [27] SWZAQHGR bugfix: up arrow when line above is a drawing
  • [28] 2LEXWUW3 get rid of some ridiculous code
  • [29] 6LJZN727 handle chords
  • [30] UHB4GARJ left/right margin -> left/right coordinates
  • [31] KWIVKQQ7 Merge lines.love
  • [32] K2X6G75Z start writing some tests for drawings
  • [33] P3K7UH5C Merge lines.love
  • [34] KYNGDE2C consistent names in a few more places
  • [35] F3NPUCCM update stale information
  • [36] N2NUGNN4 include a brief reference enabling many useful apps
  • [37] AH744RFR show when we're naming a point
  • [38] OGUV4HSA remove some memory leaks from rendered fragments
  • [39] ED4Z6ORC cleaner API for file-system access
  • [40] 2CTN2IEF Merge lines.love
  • [41] BULPIBEG beginnings of a module for the text editor
  • [42] MXA3RZYK deduce left/right from state where possible
  • [43] 7YGYHOEO Merge lines.love
  • [44] KKQKPGCI resolve conflicts
  • [45] 3QNOKBFM beginnings of a test harness
  • [46] UBA2ZUCP remove a duplicate print to screen
  • [47] RSZD5A7G forgot to add json.lua
  • [48] TBTRYEBP Merge lines.love
  • [49] FNJF2FMQ bugfix: online help
  • [50] A23MMLJH migrate old settings, attempt #3
  • [51] VHQCNMAR several more modules
  • [52] JOPVPUSA editing source code from within the app
  • [53] C2M4RUU5 reorganize some comments
  • [54] 66X36NZN a little more prose describing manual_tests
  • [55] AIHGJ4BT bugfix: infinite loop inside a very narrow window
  • [56] SDEY7LFJ rename a variable
  • [57] R5QXEHUI somebody stop me
  • [58] VPRGENLA hide some details within the 'warning' state
  • [59] MUJTM6RE bring back a level of wrapping
  • [60] 4VKEE43Z bugfix
  • [61] ISOFHXB2 App.width can no longer take a Text
  • [62] SDO4DHNU source: load cursor position from settings
  • [63] G54H3YG2 get rid of all bifold text
  • [64] KWHC65JI Merge lines.love
  • [65] J3I6DVMB drop an unused arg
  • [66] TVCPXAAU rename
  • [67] LF7BWEG4 group all editor globals
  • [68] 4MT5UHHK fix still more issues with the previous scenario
  • [69] 23KRQC4Y Merge lines.love
  • [70] 6VJTQKW7 start supporting LÖVE v12
  • [71] 5XA7TKWY pull font into editor
  • [72] SVJZZDC3 snapshot - no, that's all wrong
  • [73] CWQIPU7U always show line numbers in source editor
  • [74] ZMBPXIZ4 bugfix
  • [75] LDFXFRUO bring a few things in sync between run and source
  • [76] 6Z6WH62W resolve conflicts
  • [77] 5FW7YOFT highlight selection while dragging
  • [78] CPZGQT72 go through and fix similar issues
  • [79] 2344TV56 Merge lines.love
  • [80] YF2ATH2Q Merge lines.love
  • [81] TFUNIT6M resolve conflicts
  • [82] TLOAPLBJ add a license
  • [83] XX7G2FFJ intermingle freehand line drawings with text
  • [84] 3PSFWAIL Merge lines.love
  • [85] ZJOSQFN6 bugfix: path munging on Windows
  • [86] MGJZHZC4 Merge lines.love
  • [87] UQI34GQF make button backgrounds optional
  • [88] AVTNUQYR basic test-enabled framework
  • [89] 2Y7YH7UP infrastructure for caching LÖVE text objects
  • [90] MD3W5IRA new fork: rip out drawing support
  • [91] MP2TBKU6 bugfix: crash in Text.up() after return
  • [92] D2GCFTTT clean up repl functionality
  • [93] R3KXFRZN get rid of to_text
  • [94] PFT5Y2ZY move
  • [95] 34BZ5ZKN Merge lines.love
  • [96] G3DLS5OU audit all asserts
  • [97] UCW27FJK bugfix: utf-8
  • [98] AIBA4RWQ hide cursor in log browser window
  • [99] BLWAYPKV extract a module
  • [100] GJLOKCYK bugfix: clicking past end of screen line
  • [101] Z5HLXU4P add state arg to a few functions
  • [102] W5WCQNMP bugfix: Windows pushing title bar off screen
  • [103] FYRGHNLC resolve conflicts
  • [104] GAPPXISY moar bugfix X-(
  • [105] KKMFQDR4 editing source code from within the app
  • [106] AOZX2G5F source: no commandline args
  • [107] T4FRZSYL delete an ancient, unused file
  • [108] LWPFEZBI Merge lines.love
  • [109] H22OAXWE couple of TODOs
  • [110] 44BTGR7U Merge lines.love
  • [111] CE4LZV4T drop last couple of manual tests
  • [112] ILOA5BYF separate data structure for each line's cache data
  • [113] SGMA5JLE save the list of tests in repo
  • [114] LK4ZW4BB bugfix
  • [115] VHUNJHXB Merge lines.love
  • [116] GZ5WULJV switch source side to new screen-line-based render
  • [117] 2L5MEZV3 experiment: new edit namespace
  • [118] BJ5X5O4A let's prevent the text cursor from ever getting on a drawing
  • [119] ORKN6EOB Merge lines.love
  • [120] VOU73AK6 Merge lines.love
  • [121] VXORMHME delete experimental REPL
  • [122] T57DTBX6 add args to some functions
  • [123] OB5XOXVC deemphasize the source editor
  • [124] KMSL74GA support selections in the source editor
  • [125] H4R5BHVY no more Text allocations
  • [126] S3PNFXTB handle missing cursors in settings
  • [127] VNVRFP2V bugfix: rendering hyperlinks in wrapping lines
  • [128] ZPUQSPQP extract a few methods
  • [129] LXTTOB33 extract a couple of files
  • [130] GUOQRUL7 Merge lines.love
  • [131] GX236KZG Revert "deemphasize the source editor"
  • [132] IM7UEBMK bugfix: highlight search patterns on the right line
  • [133] 2TQUKHBC Merge lines.love
  • [134] JYZKEDDG Merge lines.love
  • [135] TWXPV2AC hoist and duplicate a conditional
  • [136] PXSQR2AD hide line numbers from log browser
  • [137] 7JH2ZT3F add state arg to Drawing.draw
  • [138] B6DS4GZC Merge lines.love
  • [139] HIKLULFQ extract a function
  • [140] 54HEXCWV clearer API for drawing a button
  • [141] ATQO62TF Merge lines.love
  • [142] 73OCE2MC after much struggle, a brute-force undo
  • [143] JZR3QMTN Merge lines.love
  • [144] TGHAJBES use line cache for drawings as well

Change contents

  • file deletion: source_text.lua (----------)source_text.lua (----------)
    [8.2][8.147062:147101](),[8.2][8.147062:147101](),[8.147101][8.83723:83723]()
    love.graphics.print(line_index, State.left-Line_number_width*State.font:getWidth('m')+10,y)
    local lo, hi = Text.clip_wikiword_with_screen_line(State.font, line, line_cache, i, s, e)
    Text.draw_cursor(State, State.left+Text.x(State.font, screen_line, State.cursor1.pos-pos+1), y)
    Text.draw_cursor(State, State.left+Text.x(State.font, screen_line, State.cursor1.pos-pos+1), y)
    x = x+State.font:getWidth(frag)
    local frag_width = State.font:getWidth(frag)
    local bpos = Text.nearest_pos_less_than(State.font, frag, State.width - x)
    frag_width = State.font:getWidth(frag)
    function Text.clip_wikiword_with_screen_line(font, line, line_cache, i, s, e)
    return font:getWidth(line.data:sub(soff, loff-1)), font:getWidth(line.data:sub(soff, hoff))
    State.cursor1.pos = screen_line_starting_pos + Text.nearest_cursor_pos(State.font, s, State.cursor_x, State.left) - 1
    State.cursor1.pos = new_screen_line_starting_pos + Text.nearest_cursor_pos(State.font, s, State.cursor_x, State.left) - 1
    pos = Text.nearest_cursor_pos(State.font, State.lines[new_cursor_line].data, State.cursor_x, State.left),
    State.cursor1.pos = new_screen_line_starting_pos + Text.nearest_cursor_pos(State.font, s, State.cursor_x, State.left) - 1
    --? print('return', mx, Text.nearest_cursor_pos(State.font, s, mx, State.left), '=>', screen_line_starting_pos + Text.nearest_cursor_pos(State.font, s, mx, State.left) - 1)
    return screen_line_starting_pos + Text.nearest_cursor_pos(State.font, s, mx, State.left) - 1
    return State.font:getWidth(screen_line)
    function Text.nearest_cursor_pos(font, line, x, left)
    local max_x = left+Text.x(font, line, len+1)
    local currxmin = left+Text.x(font, line, curr)
    local currxmax = left+Text.x(font, line, curr+1)
    function Text.nearest_pos_less_than(font, line, x)
    local max_x = Text.x_after(font, line, len)
    local currxmin = Text.x_after(font, line, curr+1)
    local currxmax = Text.x_after(font, line, curr+2)
    function Text.x_after(font, s, pos)
    return font:getWidth(s_before)
    function Text.x(font, s, pos)
    return font:getWidth(s_before)
    end
    function Text.to2(State, loc1)
    local offset = Text.offset(s, pos)
    local s_before = s:sub(1, offset-1)
    end
    local len = utf8.len(s)
    local offset = Text.offset(s, math.min(pos+1, len+1))
    --? print('', x, left, right, curr, currxmin, currxmax)
    if currxmin <= x and x < currxmax then
    return curr
    end
    if left >= right-1 then
    return left
    end
    if currxmin > x then
    right = curr
    else
    left = curr
    end
    end
    if x > max_x then
    return len+1
    end
    local left, right = 0, len+1
    while true do
    local curr = math.floor((left+right)/2)
    --? print('', '-- nearest_pos_less_than', line, x)
    local len = utf8.len(line)
    --? print('nearest', x, leftpos, rightpos, curr, currxmin, currxmax)
    if currxmin <= x and x < currxmax then
    if x-currxmin < currxmax-x then
    return curr
    else
    return curr+1
    end
    end
    if leftpos >= rightpos-1 then
    return rightpos
    end
    if currxmin > x then
    rightpos = curr
    else
    leftpos = curr
    end
    end
    if x > max_x then
    return len+1
    end
    local leftpos, rightpos = 1, len+1
    --? print('-- nearest', x)
    while true do
    --? print('nearest', x, '^'..line..'$', leftpos, rightpos)
    if leftpos == rightpos then
    return leftpos
    end
    local curr = math.floor((leftpos+rightpos)/2)
    if x < left then
    return 1
    end
    local len = utf8.len(line)
    end
    end
    y = nexty
    end
    --? print('cursor pos is now', State.cursor1.line, State.cursor1.pos)
    if scroll_down then
    --? 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)
    }
    --? print(State.cursor1.pos)
    break
    end
    --? print('cursor pos is now '..tostring(State.cursor1.pos))
    end
    if Text.lt1(State.cursor1, State.screen_top1) then
    break
    end
    end
    local spos = line_cache.screen_line_starting_pos[i]
    local soff = Text.offset(line.data, spos)
    if e < soff then
    return
    end
    local eoff
    if i < #line_cache.screen_line_starting_pos then
    local epos = line_cache.screen_line_starting_pos[i+1]
    eoff = Text.offset(line.data, epos)
    if s > eoff then
    return
    end
    --? print('screen line:', pos)
    if x == 0 and bpos == 0 then
    assert(false, ("Infinite loop while line-wrapping. Editor is %dpx wide; window is %dpx wide"):format(State.width, App.screen.width))
    end
    --? print('-- frag:', frag, pos, x, frag_width, State.width)
    while x + frag_width > State.width do
    --? print('frag:', frag, pos, x, frag_width, State.width)
    if x < 0.8 * State.width then
    -- long word; chop it at some letter
    -- We're not going to reimplement TeX here.
    end
    end
    end
    elseif pos + frag_len == State.cursor1.pos then
    -- Show cursor at end of line.
    -- This place also catches end of wrapping screen lines. That doesn't seem worth distinguishing.
    -- It seems useful to see a cursor whether your eye is on the left or right margin.
    if lo then
    end
  • file deletion: source_edit.lua (----------)source_edit.lua (----------)
    [8.2][8.165725:165764](),[8.2][8.165725:165764](),[8.165764][8.152440:152440]()
    filename = 'run.lua',
    next_save = nil,
    -- undo
    history = {},
    next_history = 1,
    -- search
    search_term = nil,
  • file deletion: source.lua (----------)source.lua (----------)
    [8.2][8.177652:177686](),[8.2][8.177652:177686](),[8.177686][8.165766:165766]()
    Editor_state = edit.initialize_state(Margin_top, Margin_left + Line_number_width*font:getWidth('m'), right, font, settings.font_height, math.floor(settings.font_height*1.3))
    Editor_state = edit.initialize_state(Margin_top, Margin_left + Line_number_width*font:getWidth('m'), App.screen.width-Margin_right, font, font_height, math.floor(font_height*1.3))
    Editor_state.filename = 'run.lua'
    Editor_state.filename = settings.filename
  • file deletion: log_browser.lua (----------)log_browser.lua (----------)
    [8.2][8.203223:203262](),[8.2][8.203223:203262](),[8.203262][8.191782:191782]()
    love.graphics.line(xleft+50+State.font:getWidth(line.section_name)+2,sectiony, xright,sectiony)
    love.graphics.line(xleft+50+State.font:getWidth(line.section_name)+2,sectiony, xright,sectiony)
    love.graphics.print(line.section_stack[i].name, x+State.font_height+5, App.screen.height-State.font:getWidth(line.section_stack[i].name)-5, --[[vertically]] math.pi/2)
    love.graphics.print(line.section_stack[i].name, x, App.screen.height-State.font:getWidth(line.section_stack[i].name)-5, --[[vertically]] math.pi/2)
    end
    end
    return log_browser.right_margin(State, line)
    end
    function should_show(line)
    -- Show a line if every single section it's in is expanded.
    for i=1,#line.section_stack do
    local section = line.section_stack[i]
    if not section.expanded then
    return false
    end
    end
    return true
    end
    function log_browser.left_margin(State, line)
    return State.left + #line.section_stack*Section_border_padding_horizontal
    end
    function log_browser.right_margin(State, line)
    return State.right - #line.section_stack*Section_border_padding_horizontal
    end
    function log_browser.update(State, dt)
    end
    function log_browser.quit(State)
    end
    end
    end
    return log_browser.left_margin(State, line)
    end
    function render_stack_right_margin(State, line_index, line, y)
    App.color(Section_border_color)
    for i=1,#line.section_stack do
    local x = State.right - (i-1)*Section_border_padding_horizontal
    love.graphics.line(x,y, x,y+log_browser.height(State, line_index))
    if y < 30 then
    love.graphics.print(line.section_stack[i].name, x, y+5, --[[vertically]] math.pi/2)
    end
    if y > App.screen.height-log_browser.height(State, line_index) then
    end
    else
    if type(line.data) == 'string' then
    local old_left, old_right = State.left,State.right
    State.left,State.right = xleft,xright
    else assert(line.section_end, "log line has a section name, but it's neither the start nor end of a section")
  • resurrect zombie in text.lua at line 97
    [8.168][7.222:271](),[8.168][7.222:271]()
    local frag_width = State.font:getWidth(frag)
  • resolve order conflict in text.lua at line 97
    [8.1938]
    [7.222]
  • edit in text.lua at line 404
    [8.4502][8.4:4](),[8.4882][7.404:530](),[8.4882][7.404:530]()
    State.cursor1.pos = screen_line_starting_pos + Text.nearest_cursor_pos(State.font, s, State.cursor_x, State.left) - 1
  • resolve order conflict in text.lua at line 404
    [8.4502]
    [8.3974]
  • replacement in text.lua at line 406
    [8.4196][8.5094:5206](),[8.5094][8.5094:5206]()
    State.cursor1.pos = screen_line_starting_pos + Text.nearest_cursor_pos(s, State.cursor_x, State.left) - 1
    [8.4196]
    [8.1706]
    State.cursor1.pos = screen_line_starting_pos + Text.nearest_cursor_pos(State.font, s, State.cursor_x, State.left) - 1
  • resurrect zombie in text.lua at line 412
    [8.127][8.4197:4427](),[8.2441][8.4197:4427](),[8.127][8.4197:4427](),[8.2441][8.4197:4427]()
    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)
  • edit in text.lua at line 414
    [8.4427][8.87:87](),[8.4427][8.87:87]()
  • resurrect zombie in text.lua at line 414
    [8.5703][7.531:657](),[8.5703][7.531:657]()
    State.cursor1.pos = new_screen_line_starting_pos + Text.nearest_cursor_pos(State.font, s, State.cursor_x, State.left) - 1
  • resolve order conflict in text.lua at line 414
    [8.4427]
    [7.531]
  • replacement in text.lua at line 435
    [8.5568][8.4428:4544]()
    State.cursor1.pos = Text.nearest_cursor_pos(State.lines[State.cursor1.line].data, State.cursor_x, State.left)
    [8.5568]
    [8.5679]
    State.cursor1.pos = Text.nearest_cursor_pos(State.font, State.lines[State.cursor1.line].data, State.cursor_x, State.left)
  • edit in text.lua at line 437
    [8.5714][8.6:6](),[8.537][7.658:774](),[8.537][7.658:774]()
    pos = Text.nearest_cursor_pos(State.font, State.lines[new_cursor_line].data, State.cursor_x, State.left),
  • resolve order conflict in text.lua at line 437
    [8.5714]
    [8.1313]
  • resurrect zombie in text.lua at line 452
    [8.4338][8.4545:4775](),[8.4338][8.4545:4775]()
    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)
  • resurrect zombie in text.lua at line 454
    [8.7111][7.775:901](),[8.7111][7.775:901]()
    State.cursor1.pos = new_screen_line_starting_pos + Text.nearest_cursor_pos(State.font, s, State.cursor_x, State.left) - 1
  • resolve order conflict in text.lua at line 454
    [8.4775]
    [7.775]
  • resurrect zombie in text.lua at line 667
    [8.538][8.5739:5811](),[8.538][8.5739:5811]()
    local s = string.sub(line.data, screen_line_starting_byte_offset)
  • resurrect zombie in text.lua at line 668
    [8.1751][7.902:1180](),[8.1751][7.902:1180]()
    --? print('return', mx, Text.nearest_cursor_pos(State.font, s, mx, State.left), '=>', screen_line_starting_pos + Text.nearest_cursor_pos(State.font, s, mx, State.left) - 1)
    return screen_line_starting_pos + Text.nearest_cursor_pos(State.font, s, mx, State.left) - 1
  • resolve order conflict in text.lua at line 668
    [8.5811]
    [7.902]
  • replacement in source_text.lua at line 17
    [8.153][8.153:239]()
    love.graphics.print(line_index, State.left-Line_number_width*App.width('m')+10,y)
    [8.153]
    [8.239]
    love.graphics.print(line_index, State.left-Line_number_width*State.font:getWidth('m')+10,y)
  • replacement in source_text.lua at line 35
    [8.764][8.764:850]()
    local lo, hi = Text.clip_wikiword_with_screen_line(line, line_cache, i, s, e)
    [8.764]
    [8.850]
    local lo, hi = Text.clip_wikiword_with_screen_line(State.font, line, line_cache, i, s, e)
  • replacement in source_text.lua at line 65
    [8.936][8.936:1032]()
    Text.draw_cursor(State, State.left+Text.x(screen_line, State.cursor1.pos-pos+1), y)
    [8.936]
    [8.1032]
    Text.draw_cursor(State, State.left+Text.x(State.font, screen_line, State.cursor1.pos-pos+1), y)
  • replacement in source_text.lua at line 70
    [8.1338][8.1338:1434]()
    Text.draw_cursor(State, State.left+Text.x(screen_line, State.cursor1.pos-pos+1), y)
    [8.1338]
    [8.1434]
    Text.draw_cursor(State, State.left+Text.x(State.font, screen_line, State.cursor1.pos-pos+1), y)
  • replacement in source_text.lua at line 79
    [8.409][8.409:439]()
    x = x+App.width(frag)
    [8.409]
    [8.439]
    x = x+State.font:getWidth(frag)
  • replacement in source_text.lua at line 123
    [8.2472][8.2472:2511]()
    local frag_width = App.width(frag)
    [8.2472]
    [8.2511]
    local frag_width = State.font:getWidth(frag)
  • replacement in source_text.lua at line 130
    [8.2815][8.2815:2886]()
    local bpos = Text.nearest_pos_less_than(frag, State.width - x)
    [8.2815]
    [8.8]
    local bpos = Text.nearest_pos_less_than(State.font, frag, State.width - x)
  • replacement in source_text.lua at line 140
    [8.3180][8.3180:3217]()
    frag_width = App.width(frag)
    [8.3180]
    [8.3217]
    frag_width = State.font:getWidth(frag)
  • replacement in source_text.lua at line 175
    [8.3993][8.3993:4065]()
    function Text.clip_wikiword_with_screen_line(line, line_cache, i, s, e)
    [8.3993]
    [8.4065]
    function Text.clip_wikiword_with_screen_line(font, line, line_cache, i, s, e)
  • replacement in source_text.lua at line 197
    [8.4555][8.7:93]()
    return App.width(line.data:sub(soff, loff-1)), App.width(line.data:sub(soff, hoff))
    [8.4555]
    [8.95094]
    return font:getWidth(line.data:sub(soff, loff-1)), font:getWidth(line.data:sub(soff, hoff))
  • replacement in source_text.lua at line 484
    [8.6431][8.6431:6545]()
    State.cursor1.pos = screen_line_starting_pos + Text.nearest_cursor_pos(s, State.cursor_x, State.left) - 1
    [8.6431]
    [8.6545]
    State.cursor1.pos = screen_line_starting_pos + Text.nearest_cursor_pos(State.font, s, State.cursor_x, State.left) - 1
  • replacement in source_text.lua at line 494
    [8.110992][8.110992:111106]()
    State.cursor1.pos = new_screen_line_starting_pos + Text.nearest_cursor_pos(s, State.cursor_x, State.left) - 1
    [8.110992]
    [8.111106]
    State.cursor1.pos = new_screen_line_starting_pos + Text.nearest_cursor_pos(State.font, s, State.cursor_x, State.left) - 1
  • replacement in source_text.lua at line 519
    [8.7779][8.7779:7883]()
    pos = Text.nearest_cursor_pos(State.lines[new_cursor_line].data, State.cursor_x, State.left),
    [8.7779]
    [8.7883]
    pos = Text.nearest_cursor_pos(State.font, State.lines[new_cursor_line].data, State.cursor_x, State.left),
  • replacement in source_text.lua at line 541
    [8.116711][8.116711:116825]()
    State.cursor1.pos = new_screen_line_starting_pos + Text.nearest_cursor_pos(s, State.cursor_x, State.left) - 1
    [8.116711]
    [8.116825]
    State.cursor1.pos = new_screen_line_starting_pos + Text.nearest_cursor_pos(State.font, s, State.cursor_x, State.left) - 1
  • replacement in source_text.lua at line 804
    [8.6668][8.6668:6910]()
    --? print('return', mx, Text.nearest_cursor_pos(s, mx, State.left), '=>', screen_line_starting_pos + Text.nearest_cursor_pos(s, mx, State.left) - 1)
    return screen_line_starting_pos + Text.nearest_cursor_pos(s, mx, State.left) - 1
    [8.6668]
    [8.135392]
    --? print('return', mx, Text.nearest_cursor_pos(State.font, s, mx, State.left), '=>', screen_line_starting_pos + Text.nearest_cursor_pos(State.font, s, mx, State.left) - 1)
    return screen_line_starting_pos + Text.nearest_cursor_pos(State.font, s, mx, State.left) - 1
  • replacement in source_text.lua at line 825
    [8.136039][8.1216:1248]()
    return App.width(screen_line)
    [8.136039]
    [8.136153]
    return State.font:getWidth(screen_line)
  • replacement in source_text.lua at line 839
    [8.137685][8.137685:137733]()
    function Text.nearest_cursor_pos(line, x, left)
    [8.137685]
    [8.137733]
    function Text.nearest_cursor_pos(font, line, x, left)
  • replacement in source_text.lua at line 844
    [8.137800][8.137800:137841]()
    local max_x = left+Text.x(line, len+1)
    [8.137800]
    [8.137841]
    local max_x = left+Text.x(font, line, len+1)
  • replacement in source_text.lua at line 856
    [8.138140][8.138140:138232]()
    local currxmin = left+Text.x(line, curr)
    local currxmax = left+Text.x(line, curr+1)
    [8.138140]
    [8.138232]
    local currxmin = left+Text.x(font, line, curr)
    local currxmax = left+Text.x(font, line, curr+1)
  • replacement in source_text.lua at line 881
    [8.138771][8.138771:138816]()
    function Text.nearest_pos_less_than(line, x)
    [8.138771]
    [8.138816]
    function Text.nearest_pos_less_than(font, line, x)
  • replacement in source_text.lua at line 884
    [8.138898][8.138898:138938]()
    local max_x = Text.x_after(line, len)
    [8.138898]
    [8.138938]
    local max_x = Text.x_after(font, line, len)
  • replacement in source_text.lua at line 891
    [8.139072][8.139072:139168]()
    local currxmin = Text.x_after(line, curr+1)
    local currxmax = Text.x_after(line, curr+2)
    [8.139072]
    [8.139168]
    local currxmin = Text.x_after(font, line, curr+1)
    local currxmax = Text.x_after(font, line, curr+2)
  • replacement in source_text.lua at line 909
    [8.139457][8.139457:139487]()
    function Text.x_after(s, pos)
    [8.139457]
    [4.8]
    function Text.x_after(font, s, pos)
  • replacement in source_text.lua at line 914
    [8.139612][8.1249:1278]()
    return App.width(s_before)
    [8.139612]
    [8.139713]
    return font:getWidth(s_before)
  • replacement in source_text.lua at line 917
    [8.139718][8.139718:139742]()
    function Text.x(s, pos)
    [8.139718]
    [8.139742]
    function Text.x(font, s, pos)
  • replacement in source_text.lua at line 920
    [8.139817][8.1279:1308]()
    return App.width(s_before)
    [8.139817]
    [8.139918]
    return font:getWidth(s_before)
  • replacement in source_edit.lua at line 97
    [8.155094][8.11:118]()
    filename = love.filesystem.getSourceBaseDirectory()..'/lines.txt', -- '/' should work even on Windows
    [8.155094]
    [8.155159]
    filename = 'run.lua',
  • replacement in source.lua at line 129
    [8.169531][5.387:559]()
    Editor_state = edit.initialize_state(Margin_top, Margin_left + Line_number_width*App.width('m'), right, font, settings.font_height, math.floor(settings.font_height*1.3))
    [8.169531]
    [8.169662]
    Editor_state = edit.initialize_state(Margin_top, Margin_left + Line_number_width*font:getWidth('m'), right, font, settings.font_height, math.floor(settings.font_height*1.3))
  • replacement in source.lua at line 157
    [8.51][5.611:789]()
    Editor_state = edit.initialize_state(Margin_top, Margin_left + Line_number_width*App.width('m'), App.screen.width-Margin_right, font, font_height, math.floor(font_height*1.3))
    [8.51]
    [8.2008]
    Editor_state = edit.initialize_state(Margin_top, Margin_left + Line_number_width*font:getWidth('m'), App.screen.width-Margin_right, font, font_height, math.floor(font_height*1.3))
  • edit in select.lua at line 60
    [8.6273][8.1536:1536](),[8.6273][8.1536:1536](),[8.1536][8.785:817](),[8.514][8.785:817](),[8.514][8.785:817]()
    lo_px = App.width(before)
  • resurrect zombie in select.lua at line 60
    [8.514][7.4462:4504](),[8.514][7.4462:4504]()
    lo_px = State.font:getWidth(before)
  • resolve order conflict in select.lua at line 60
    [8.6273]
    [7.4462]
  • edit in main.lua at line 328
    [8.190711][8.995:995](),[8.191282][6.20:67](),[8.191282][6.20:67](),[8.191282][6.20:67]()
    if Disable_all_quit_handlers then return end
  • resolve order conflict in main.lua at line 328
    [8.190711]
    [8.235]
  • edit in main.lua at line 332
    [8.190738]
    [3.1368]
    if Disable_all_quit_handlers then return end
  • replacement in log_browser.lua at line 97
    [8.1717][8.1717:1813]()
    love.graphics.line(xleft+50+App.width(line.section_name)+2,sectiony, xright,sectiony)
    [8.1717]
    [8.3529]
    love.graphics.line(xleft+50+State.font:getWidth(line.section_name)+2,sectiony, xright,sectiony)
  • replacement in log_browser.lua at line 104
    [8.1875][8.1875:1971]()
    love.graphics.line(xleft+50+App.width(line.section_name)+2,sectiony, xright,sectiony)
    [8.1875]
    [8.195859]
    love.graphics.line(xleft+50+State.font:getWidth(line.section_name)+2,sectiony, xright,sectiony)
  • replacement in log_browser.lua at line 140
    [8.197122][8.1972:2136]()
    love.graphics.print(line.section_stack[i].name, x+State.font_height+5, App.screen.height-App.width(line.section_stack[i].name)-5, --[[vertically]] math.pi/2)
    [8.197122]
    [8.197295]
    love.graphics.print(line.section_stack[i].name, x+State.font_height+5, App.screen.height-State.font:getWidth(line.section_stack[i].name)-5, --[[vertically]] math.pi/2)
  • replacement in log_browser.lua at line 155
    [8.197818][8.2137:2281]()
    love.graphics.print(line.section_stack[i].name, x, App.screen.height-App.width(line.section_stack[i].name)-5, --[[vertically]] math.pi/2)
    [8.197818]
    [8.197971]
    love.graphics.print(line.section_stack[i].name, x, App.screen.height-State.font:getWidth(line.section_stack[i].name)-5, --[[vertically]] math.pi/2)
  • resurrect zombie in help.lua at line 1
    [8.6622][8.2287:2874](),[8.6622][8.2287:2874]()
    function draw_help_without_mouse_pressed(State, drawing_index)
    local drawing = State.lines[drawing_index]
    local line_cache = State.line_cache[drawing_index]
    App.color(Help_color)
    local y = line_cache.starty+10
    love.graphics.print("Things you can do:", State.left+30,y)
    y = y + State.line_height
    love.graphics.print("* Press the mouse button to start drawing a "..current_shape(State), State.left+30,y)
    y = y + State.line_height
    love.graphics.print("* Hover on a point and press 'ctrl+u' to pick it up and start moving it,", State.left+30,y)
    y = y + State.line_height
  • replacement in help.lua at line 12
    [8.2874][8.2874:2971](),[8.2874][8.2874:2971]()
    love.graphics.print("then press the mouse button to drop it", State.left+30+bullet_indent(),y)
    [8.2874]
    [8.2971]
    love.graphics.print("then press the mouse button to drop it", State.left+30+State.font:getWidth('* '),y)
  • edit in help.lua at line 147
    [8.9454][8.9454:9484](),[8.9454][8.9454:9484](),[8.460][7.5225:5332](),[8.460][7.5225:5332](),[8.9484][8.832:857](),[8.11371][8.832:857](),[8.11371][8.832:857]()
    end
    function bullet_indent()
    love.graphics.print("then press the mouse button to drop it", State.left+30+State.font:getWidth('* '),y)
    return App.width('* ')
  • resurrect zombie in help.lua at line 147
    [8.857][8.9485:9489](),[8.857][8.9485:9489]()
    end
  • resolve order conflict in help.lua at line 147
    [8.9454]
    [8.9485]
  • replacement in drawing.lua at line 64
    [8.12424][8.9523:9563]()
    name_width = App.width('m')
    [8.12424]
    [8.12457]
    name_width = State.font:getWidth('m')
  • replacement in drawing.lua at line 66
    [8.12472][8.9564:9607]()
    name_width = App.width(p.name)
    [8.12472]
    [8.12541]
    name_width = State.font:getWidth(p.name)
  • edit in drawing.lua at line 744
    [8.42200][8.9582:9582](),[8.404][7.5338:5388](),[8.404][7.5338:5388](),[8.503][7.5389:5442](),[8.503][7.5389:5442]()
    name_width = State.font:getWidth('m')
    name_width = State.font:getWidth(p.name)
  • resolve order conflict in drawing.lua at line 744
    [8.42200]