Merge text.love

[?]
Apr 9, 2023, 5:59 AM
CBTPWFGM2DOW6ZHW6NF6Y5REZBHSO5EZGSUFAYIWPRZ3RV2TZP7QC

Dependencies

Change contents

  • file deletion: source_text.lua (----------)source_text.lua (----------)
    [4.2][4.147125:147164](),[4.2][4.147125:147164](),[4.147164][4.83786:83786]()
    Text.draw_cursor(State, State.left+Text.x(screen_line, State.cursor1.pos-pos+1), y)
    end
    end
    end
    -- render colorized text
    local x = State.left
    for frag in screen_line:gmatch('%S*%s*') do
    select_color(frag)
    App.screen.print(frag, x,y)
    x = x+App.width(frag)
    end
    -- render cursor if necessary
    local screen_line = Text.screen_line(line, line_cache, i)
    --? print('text.draw:', screen_line, 'at', line_index,pos, 'after', x,y)
    local frag_len = utf8.len(screen_line)
    -- render any link decorations
    for _,link_offsets in ipairs(line_cache.link_offsets) do
    local s,e,filename = unpack(link_offsets)
    local lo, hi = Text.clip_wikiword_with_screen_line(line, line_cache, i, s, e)
    if lo then
    button(State, 'link', {x=State.left+lo, y=y, w=hi-lo, h=State.line_height, color={1,1,1},
    icon = icon.hyperlink_decoration,
    onpress1 = function()
    if file_exists(filename) then
    source.switch_to_file(filename)
    end
    end,
    })
    --? print('skipping', screen_line)
    else