L5XCYDKRZJ4WXDEI6IL2RW63B3VRE6NPP5DW4HVU3CHCMCZEFLIAC TJPL6S3YDULVVDS5AWVPQ6QJ3B4YFTNFIZTS3SOHNTMFIOMYVFTQC SW7BSBMJZLUDRMHO2HMCHQW6PPGCEBL4JSDTAHVYPCZLBEKY54XQC R5QXEHUIZLELJGGCZAE7ATNS3CLRJ7JFRENMGH4XXH24C5WABZDQC KKMFQDR43ZWVCDRHQLWWX3FCWCFA3ZSXYOBRJNPHUQZR2XPKWULAC ZQDQLLCLNA2GHTR32BP3CJ4J5M43BWJXELK2M6Y3LKUDMFIHB46QC JOPVPUSAMMU6RFVDQR4NJC4GNNUFB7GPKVH7OS5FKCYS5QZ53VLQC XGJWKEBNWNZKGQCAZJ3JTAGMHWDWEK3EDBGUHAN3LFCMYTEHPOHQC SVA7IC5OQMN72OUQ7BLBM4SKAMTZOHYNKZTYOFMW6AY4577LUCWQC D2KRR2KTJJQCVGQYIEJDLV4NKMXBSNN6WOB62BVZ67KKMBRITD7AC 2KPJVPKBIHNRL5XGZZGGKDMK5OAENP7YUXBQMQSHBNUVLIWA4IFQC 7VGDIPLCFDG3PVE4JH3WDKZ4A7PG5UYW7TLFFFOWN2JEUZYYTFJQC HESBC35LBCNFWDFRAO6Z4EJ67BCBHCRETCPEJCV2BDPHUJJFY3WQC 2L5MEZV344TOZLVY3432RHJFIRVXFD6O3GWLL5O4CV66BGAFTURQC AF253GHLDMRDMDL5X3OV2UJ5NPKBBMHGH4B3R5IGR35KO6IKYPKQC APYPFFS3G6TDEUMIHQGMDBJNRNDTCNTPKI5M2AFACJ73P725XQRQC filename=absolutize(Editor_state.filename),function absolutize(path)if is_relative_path(path) thenreturn love.filesystem.getWorkingDirectory()..'/'..path -- '/' should work even on Windowsendreturn pathendfunction run.mouse_press(x,y, mouse_button)screen_top=Editor_state.screen_top1, cursor=Editor_state.cursor1}endif #arg > 0 and Editor_state.filename ~= absolutize(arg[1]) thenEditor_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}
endlocal filename = Editor_state.filenameif is_relative_path(filename) thenfilename = 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 linefunction edit.invalid_cursor1(State)local cursor1 = State.cursor1if cursor1.line > #State.lines then return true endlocal l = State.lines[cursor1.line]if l.mode ~= 'text' then return false end -- pos is irrelevant to validity for a drawing linereturn 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 linefunction edit.invalid_cursor1(State)local cursor1 = State.cursor1if cursor1.line > #State.lines then return true endlocal l = State.lines[cursor1.line]if l.mode ~= 'text' then return false end -- pos is irrelevant to validity for a drawing linereturn cursor1.pos > #State.lines[cursor1.line].data + 1