From e80ec842005ddeaece5c04f1cea8bccdb24c845a Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Thu, 19 Sep 2019 14:07:05 -0400 Subject: Fixed bug introduced in r2623. --- core/ui.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/ui.lua') diff --git a/core/ui.lua b/core/ui.lua index 0d1c72bb..295a24c3 100644 --- a/core/ui.lua +++ b/core/ui.lua @@ -243,12 +243,12 @@ end -- @name goto_file function ui.goto_file(filename, split, preferred_view, sloppy) local patt = '^'..filename..'$' -- TODO: escape filename properly + if sloppy then patt = filename:match('[^/\\]+$')..'$' end if WIN32 then - filename = filename:gsub('%a', function(letter) + patt = patt: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() else -- cgit v1.2.3