diff options
author | 2019-09-19 11:53:02 -0400 | |
---|---|---|
committer | 2019-09-19 11:53:02 -0400 | |
commit | c75e5899db73f3a1f05c43b3bfd8a6ec80ff8a89 (patch) | |
tree | 12aab7a73e8db1f7d069f91deab32bfde3d0fd12 /core | |
parent | e19d831cf673411bb8a1c96a27131cf9cde496a0 (diff) |
Properly handle absolute paths in run output and case-insensitivity on Windows.
Diffstat (limited to 'core')
-rw-r--r-- | core/ui.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/ui.lua b/core/ui.lua index 9f940e32..0d1c72bb 100644 --- a/core/ui.lua +++ b/core/ui.lua @@ -243,6 +243,11 @@ end -- @name goto_file function ui.goto_file(filename, split, preferred_view, sloppy) local patt = '^'..filename..'$' -- TODO: escape filename properly + if WIN32 then + filename = filename:gsub('%a', function(letter) + return string.format('[%s%s]', letter:upper(), letter:lower()) + end) + end if sloppy then patt = filename:match('[^/\\]+$')..'$' end if #_VIEWS == 1 and split and not (view.buffer.filename or ''):find(patt) then view:split() |