resolve conflicts

akkartik
Jul 10, 2024, 5:26 AM
KQ22RW43RQQKZ45TUA3GR3IW5MCH5CLOYCH56TD3672BAEP5XGHQC

Dependencies

Change contents

  • file deletion: source_undo.lua (----------)source_undo.lua (----------)
    [4.2][4.3520:3559](),[4.2][4.3520:3559](),[4.3559][4.68:68]()
    table.insert(event.lines, deepcopy(State.lines[i]))
    end
    return event
    end
    function patch(lines, from, to)
    --? if #from.lines == 1 and #to.lines == 1 then
    --? assert(from.start_line == from.end_line)
    --? assert(to.start_line == to.end_line)
    --? assert(from.start_line == to.start_line)
    --? lines[from.start_line] = to.lines[1]
    --? return
    --? end
  • file deletion: source_text.lua (----------)source_text.lua (----------)
    [4.2][4.147125:147164](),[4.2][4.147125:147164](),[4.147164][4.83786:83786]()
    Text.redraw_all(State) -- if we're scrolling, reclaim all line caches to avoid memory leaks
    Text.redraw_all(State) -- if we're scrolling, reclaim all line caches to avoid memory leaks
    Text.redraw_all(State) -- if we're scrolling, reclaim all line caches to avoid memory leaks
    Text.redraw_all(State) -- if we're scrolling, reclaim all line caches to avoid memory leaks
    Text.redraw_all(State) -- if we're scrolling, reclaim all line caches to avoid memory leaks
    Text.redraw_all(State) -- if we're scrolling, reclaim all line caches to avoid memory leaks
    --? print('clearing line caches')
    -- Perform some early sanity checking here, in hopes that we correctly call
    -- this whenever we change editor state.
    if State.right <= State.left then
    assert(false, ('Right margin %d must be to the right of the left margin %d'):format(State.right, State.left))
    end
    end
    function Text.in_line(State, line_index, x,y)
    local line = State.lines[line_index]
    local line_cache = State.line_cache[line_index]
    end
    end
    end
    end
    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)
    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)
    end
    Text.clear_screen_line_cache(State, State.cursor1.line)
  • file deletion: source_edit.lua (----------)source_edit.lua (----------)
    [4.2][4.165788:165827](),[4.2][4.165788:165827](),[4.165827][4.152503:152503]()
    -- screen_line_starting_pos: optional array of codepoint indices if it wraps over more than one screen line
    Text.redraw_all(State) -- if we're scrolling, reclaim all line caches to avoid memory leaks
    Text.redraw_all(State) -- if we're scrolling, reclaim all line caches to avoid memory leaks
    Text.redraw_all(State) -- if we're scrolling, reclaim all line caches to avoid memory leaks
    schedule_save(State)
    end
    -- clipboard
    schedule_save(State)
    end
    elseif chord == 'C-y' then
    elseif chord == 'return' then
    State.search_term = nil
    line_cache = {},
    -- Given wrapping, any potential location for the text cursor can be described in two ways:
    -- * schema 1: As a combination of line index and position within a line (in utf8 codepoint units)
    -- * schema 2: As a combination of line index, screen line index within the line, and a position within the screen line.