made ed.open use the full path for the file

This commit is contained in:
Izaya 2020-08-21 10:35:25 +10:00
parent d12ec38016
commit d15a841316
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ function ed.open(buffer)
end
if type(buffer) ~= "table" then buffer = ed.newBuffer() end
buffer[1] = buffer[1] or ""
buffer.path = buffer.path or bpath
buffer.path = buffer.path or "/"..((bpath:sub(1,1) == "/" and table.concat(fs.segments(path),"/")) or table.concat(fs.segments(os.getenv("PWD").."/"..bpath)))
return buffer
end