Merge lines.love
[?]
Sep 11, 2022, 3:47 PM
G3PZV45B3FZTAJM3XO6TXNQISDNR5I66QLWB45NRDUFDXHRNQOXQCDependencies
- [2]
ODRCS4NCbetter dirname - [3]
57OGXVHZMerge lines.love - [4]
NFI42KGXmore correct absolute path detection - [5]
YTSPVDZHfirst successful pagedown test, first bug found by test - [6]
QYIFOHW3first test! - [7]
VHQCNMARseveral more modules - [8]
CQYKYJJUremember window positions across restart/ctrl+e - [9]
ZJOSQFN6bugfix: path munging on Windows - [10]
3HIZXZI7Merge lines.love - [11]
KKMFQDR4editing source code from within the app - [12]
ZLEPKWDJfork: capture frontend for a note-taking system
Change contents
- edit in run.lua at line 152
if is_relative_path(filename) thenfilename = love.filesystem.getWorkingDirectory()..'/'..filename -- '/' should work even on Windows - resolve order conflict in run.lua at line 152[5.184045]
- edit in file.lua at line 193
function is_absolute_path(path)local os_path_separator = package.config:sub(1,1)if os_path_separator == '/' then-- POSIX systems permit backslashes in filenamesreturn path:sub(1,1) == '/'elseif os_path_separator == '\\' thenlocal f = path:sub(1,1)return f == '/' or f == '\\'elseerror('What OS is this? LÖVE reports that the path separator is "'..os_path_separator..'"')endend - edit in file.lua at line 207
function is_relative_path(path)return not is_absolute_path(path)end - replacement in file.lua at line 212
return path:match('.*[/\\]') or './'local os_path_separator = package.config:sub(1,1)if os_path_separator == '/' then-- POSIX systems permit backslashes in filenamesreturn path:match('.*/') or './'elseif os_path_separator == '\\' thenreturn path:match('.*[/\\]') or './'elseerror('What OS is this? LÖVE reports that the path separator is "'..os_path_separator..'"')end - edit in file.lua at line 229
return string.gsub(path, ".*/(.*)", "%1")endfunction is_absolute_path(path) - resolve order conflict in file.lua at line 229
- replacement in file.lua at line 232
return path:sub(1,1) == '/'return string.gsub(path, ".*/(.*)", "%1") - replacement in file.lua at line 234
local f = path:sub(1,1)return f == '/' or f == '\\'return string.gsub(path, ".*[/\\](.*)", "%1") - edit in file.lua at line 239
function is_relative_path(path)return not is_absolute_path(path)end