Merge text.love

[?]
Mar 17, 2023, 6:15 PM
R56CKHYZLUOTRK42EKTFC4KUUYI76PREFVFE2YKCZCODFKIJKAQQC

Dependencies

Change contents

  • file deletion: source_edit.lua (----------)source_edit.lua (----------)
    [5.2][5.165788:165827](),[5.2][5.165788:165827](),[5.165827][5.152503:152503]()
    State.cursor1 = {line=i, pos=1}
    break
    end
    end
    end
    function edit.check_locs(State)
    -- if State is inconsistent (i.e. file changed by some other program),
    -- throw away all cursor state entirely
    if edit.invalid1(State, State.screen_top1)
    or edit.invalid1(State, State.cursor1)
    or not edit.cursor_on_text(State)
    or not Text.le1(State.screen_top1, State.cursor1) then
    State.screen_top1 = {line=1, pos=1}
    edit.put_cursor_on_first_text_line(State)
    end
    end
    function edit.invalid1(State, loc1)
    return loc1.line > #State.lines
    or loc1.pos > #State.lines[loc1.line].data
    end
    function edit.cursor_on_text(State)
    return State.cursor1.line <= #State.lines
    and State.lines[State.cursor1.line].mode == 'text'
    end
    function edit.put_cursor_on_first_text_line(State)
    for i,line in ipairs(State.lines) do
    if line.mode == 'text' then
  • file deletion: source.lua (----------)source.lua (----------)
    [5.2][5.177715:177749](),[5.2][5.177715:177749](),[5.177749][5.165829:165829]()
    edit.check_locs(Editor_state)
    -- We currently start out with side B collapsed.
    -- Other options:
    -- * save all expanded state by line
    -- * expand all if any location is in side B
    if Editor_state.cursor1.line > #Editor_state.lines then
    Editor_state.cursor1 = {line=1, pos=1}
    end
    if Editor_state.screen_top1.line > #Editor_state.lines then
    Editor_state.screen_top1 = {line=1, pos=1}
    end
    edit.eradicate_locations_after_the_fold(Editor_state)
    if rawget(_G, 'jit') then
    jit.off()
    jit.flush()
    end
    end
    function source.load_settings()
    local settings = Settings.source
    love.graphics.setFont(love.graphics.newFont(settings.font_height))
    -- maximize window to determine maximum allowable dimensions
  • file deletion: run.lua (----------)run.lua (----------)
    [5.2][5.183867:183898](),[5.2][5.183867:183898](),[5.183898][5.178107:178107]()
    edit.check_locs(Editor_state)
    love.window.setTitle('text.love - '..Editor_state.filename)
    end
    function run.draw()
    edit.draw(Editor_state)
    end
    function run.update(dt)
    Cursor_time = Cursor_time + dt
    edit.update(Editor_state, dt)
    end
    function run.quit()
    edit.quit(Editor_state)
    end
    function run.settings()
    edit.check_locs(Editor_state)
    love.window.setTitle('text.love - '..Editor_state.filename)
    if #arg > 1 then
    print('ignoring commandline args after '..arg[1])
    end
    if rawget(_G, 'jit') then
    jit.off()
    jit.flush()
    end
    end
    function run.load_settings()
    love.graphics.setFont(love.graphics.newFont(Settings.font_height))
  • edit in main.lua at line 55
    [5.187634]
    [5.2883]
    edit.check_locs(Editor_state)
  • edit in main.lua at line 133
    [5.5982]
    [5.5982]
    edit.check_locs(Editor_state)
  • resurrect zombie in edit.lua at line 87
    [5.371][5.371:472](),[5.371][5.371:472](),[5.472][4.919:955](),[5.472][4.919:955](),[4.955][5.518:648](),[5.518][5.518:648](),[5.518][5.518:648](),[5.790][5.790:795](),[5.790][5.790:795]()
    or not Text.le1(State.screen_top1, State.cursor1) then
    State.screen_top1 = {line=1, pos=1}
    State.cursor1 = {line=1, pos=1}
    end
    end
    function edit.invalid1(State, loc1)
    return loc1.line > #State.lines
    or loc1.pos > #State.lines[loc1.line].data
    end