Merge text.love

[?]
May 15, 2023, 12:34 AM
IGBTDA6YWCM6SRQCH5JL4GJLQDKI5JCG2QA7GF7WR24SLWSCSXEAC

Dependencies

Change contents

  • file deletion: source_text.lua (----------)source_text.lua (----------)
    [5.2][5.147125:147164](),[5.2][5.147125:147164](),[5.147164][5.83786:83786]()
    return App.width(line.data:sub(soff, loff-1)), App.width(line.data:sub(soff, hoff))
    assert(State.cursor1.pos)
    if Text.cursor_at_final_screen_line(State) then
    -- line is done, skip to next text line
    --? print('cursor at final screen line of its line')
    end
  • file deletion: source.lua (----------)source.lua (----------)
    [5.2][5.177715:177749](),[5.2][5.177715:177749](),[5.177749][5.165829:165829]()
    log_browser.draw(Log_browser_state, --[[hide_cursor]] Focus ~= 'log_browser')
    end
  • file deletion: log_browser.lua (----------)log_browser.lua (----------)
    [5.2][5.202684:202723](),[5.2][5.202684:202723](),[5.202723][5.191243:191243]()
    Text.draw(State, line_index, y, --[[startpos]] 1, hide_cursor)
    State.left,State.right = old_left,old_right
    else
    height = log_render[line.data.name](line.data, xleft, y, xright-xleft)
    end
    end
    if App.mouse_x() > Log_browser_state.left and line_index == mouse_line_index then
    App.color(Cursor_line_background_color)
    love.graphics.rectangle('fill', xleft,y, xright-xleft, height)
    end
    y = y + height
    end
    end
    end
    function render_stack_left_margin(State, line_index, line, y)
    if line.section_stack == nil then
    -- assertion message
    for k,v in pairs(line) do
    print(k)
    end
    end
    App.color(Section_border_color)
    for i=1,#line.section_stack do
    local x = State.left + (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+State.font_height+5, y+5, --[[vertically]] math.pi/2)
    end
    if y > App.screen.height-log_browser.height(State, line_index) then
    function log_browser.draw(State, hide_cursor)
    assert(#State.lines == #State.line_cache)
    local mouse_line_index = log_browser.line_index(State, App.mouse_x(), App.mouse_y())
    local y = State.top
    for line_index = State.screen_top1.line,#State.lines do
    App.color(Text_color)
    local line = State.lines[line_index]
    if y + State.line_height > App.screen.height then break end
    local height = State.line_height
    if should_show(line) then
    local xleft = render_stack_left_margin(State, line_index, line, y)
    local xright = render_stack_right_margin(State, line_index, line, y)
    if line.section_name then
    App.color(Section_border_color)