3XNFQDDNFGTN6ZFAB47AR6Q3663WLXDYC3K5TERYUWDM6U2FNOVAC
ONHKBLLCD5NDO3HSSUMAMGJ7HDT53JYVV56DI42AEYI3W63GKACQC
SW7BSBMJZLUDRMHO2HMCHQW6PPGCEBL4JSDTAHVYPCZLBEKY54XQC
R5QXEHUIZLELJGGCZAE7ATNS3CLRJ7JFRENMGH4XXH24C5WABZDQC
KKMFQDR43ZWVCDRHQLWWX3FCWCFA3ZSXYOBRJNPHUQZR2XPKWULAC
ZQDQLLCLNA2GHTR32BP3CJ4J5M43BWJXELK2M6Y3LKUDMFIHB46QC
JOPVPUSAMMU6RFVDQR4NJC4GNNUFB7GPKVH7OS5FKCYS5QZ53VLQC
JKENJ2UGUCIHH27LSUZLVZIYOTUR3JDWUG453OFYTRL3V3IRQGTAC
DCO5BQWVIAW3KDY3VUMKZPCPWAVZJSTZGNWU6CRY3I5FVLU76REQC
C3NYQP57XGSNOG2R6MT2OIJWHVFW53VUTHOW7RVYP66OEBE6GVBQC
KG7YVGVRDJVCKZ3SZMNWO4QGYPVOT27DH7TBQGRUMPOUDVQ6J5XQC
7VGDIPLCFDG3PVE4JH3WDKZ4A7PG5UYW7TLFFFOWN2JEUZYYTFJQC
U3MJNFUY4ER65BIKP4D7JGVYWFPXA55KBJYD4RH5KRRKRQXBAW5AC
2L5MEZV344TOZLVY3432RHJFIRVXFD6O3GWLL5O4CV66BGAFTURQC
AF253GHLDMRDMDL5X3OV2UJ5NPKBBMHGH4B3R5IGR35KO6IKYPKQC
APYPFFS3G6TDEUMIHQGMDBJNRNDTCNTPKI5M2AFACJ73P725XQRQC
function absolutize(path)
if is_relative_path(path) then
return love.filesystem.getWorkingDirectory()..'/'..path -- '/' should work even on Windows
end
return path
end
function run.mouse_press(x,y, mouse_button)
filename=absolutize(Editor_state.filename),
screen_top=Editor_state.screen_top1, cursor=Editor_state.cursor1
}
end
if #arg > 0 and Editor_state.filename ~= absolutize(arg[1]) then
Editor_state.filename = arg[1]
load_from_disk(Editor_state)
Text.redraw_all(Editor_state)
Editor_state.screen_top1 = {line=1, pos=1}
Editor_state.cursor1 = {line=1, pos=1}
end
local filename = Editor_state.filename
if is_relative_path(filename) then
filename = love.filesystem.getWorkingDirectory()..'/'..filename -- '/' should work even on Windows
end
-- cursor loc in particular differs from other locs in one way:
-- pos might occur just after end of line
function edit.invalid_cursor1(State)
local cursor1 = State.cursor1
if cursor1.line > #State.lines then return true end
local l = State.lines[cursor1.line]
if l.mode ~= 'text' then return false end -- pos is irrelevant to validity for a drawing line
return cursor1.pos > #State.lines[cursor1.line].data + 1
-- cursor loc in particular differs from other locs in one way:
-- pos might occur just after end of line
function edit.invalid_cursor1(State)
local cursor1 = State.cursor1
if cursor1.line > #State.lines then return true end
local l = State.lines[cursor1.line]
if l.mode ~= 'text' then return false end -- pos is irrelevant to validity for a drawing line
return cursor1.pos > #State.lines[cursor1.line].data + 1