aboutsummaryrefslogtreecommitdiffhomepage
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/ui.lua5
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()