5NKJUM5IV5M64YRK3A2UWFJWEJ4V5PFLDEWGDOL263FLZ2SFQAVAC
PTTZ7YRF3AKTO3LKL2PDC67H34NFKY2FRWL5HK6PZ2YWLPT5IUAAC
JYZKEDDGZMLIH3GHTMURYCJ6H7IHZKPG4NT2RUZXLMENPV2UTCVAC
ICUW7F3XQLURK4LSNPH5E3NDEFSRHKATEUHH2UPFJTMHYR3ZJF3QC
BULPIBEGL7TMK6CVIE7IS7WGAHGOSUJBGJSFQK542MOWGHP2ADQQC
I64IPGJXWRTGHHVAYJUBUIWFR4BY6NM5P7TLTV4JOD7K4BVYDECQC
SDEY7LFJ4LY735OZAJ6X5Y2SE3MFBT4X4TWLHVW3SS2JAK757E6QC
LLQC2M2IMEJBJQXZTKC3OAKG5WKHSERXKAKCYHQRUZZD6CVRIHAQC
HALS7E5UGKCP3DFY456F7Z3Y6WNGIABOCV2SHT34D5ZAGNCPV5PQC
TVZWTOE3T54QML767ZPFXBAFACGQ7CI4NIU63YZP5STFCWSAJ7CAC
JOPVPUSAMMU6RFVDQR4NJC4GNNUFB7GPKVH7OS5FKCYS5QZ53VLQC
KWIVKQQ7AANRG6R4ZRB5TDBZ2TZTXAXIR2P6JNT362KIAJ7JQ4VQC
3VHUIIATPOF7FXB7NTL5MESCV5BCQACII2D7QZ4UIUCBX3CWXMMAC
F52PSTYSIIUD7UPEVLEJPVSBQU7IKVHM4GN4YASNSKFP4MRE6S6AC
App.screen.print(screen_line, State.left,y)
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)
-- 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
Text.draw_cursor(State, State.left+Text.x(screen_line, State.cursor1.pos-pos+1), y)