From c75e5899db73f3a1f05c43b3bfd8a6ec80ff8a89 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Thu, 19 Sep 2019 11:53:02 -0400 Subject: Properly handle absolute paths in run output and case-insensitivity on Windows. --- core/ui.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core/ui.lua') 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() -- cgit v1.2.3