Fix ApplyRules misfires on weird paths, gotos don't include gc buffers

This commit is contained in:
Krzosa Karol
2024-08-15 07:27:05 +02:00
parent eeb6caa58d
commit a3e87b2508
7 changed files with 45 additions and 20 deletions

View File

@@ -279,6 +279,8 @@ function SkipPath(s)
if not slash_eaten then break end
end
if #cells == 0 then return s end
local skip_size = input_s:len() - s:len()
local path = input_s:sub(1, skip_size)
return s, path, drive, cells
@@ -297,6 +299,8 @@ end
function MatchWindowsPath(_s)
local s, file_path, drive = SkipPath(_s)
if not file_path then return nil end
if not drive then
local d = GetActiveMainWindowBufferDir()
file_path = d..'/'..file_path