fix: reverse range in character class error (#2345)

This commit is contained in:
Tommy Nguyen
2023-02-19 11:21:29 +01:00
committed by GitHub
parent 5ce991ad23
commit ad37745d4d

View File

@@ -30,7 +30,7 @@ function from_entry.path(entry, validate, escape)
-- TODO(conni2461): we are not going to return the expanded path because -- TODO(conni2461): we are not going to return the expanded path because
-- this would lead to cache misses in the perviewer. -- this would lead to cache misses in the perviewer.
-- Requires overall refactoring in previewer interface -- Requires overall refactoring in previewer interface
local expanded = vim.fn.expand(path) local expanded = vim.fn.expand(vim.fn.escape(path, "?*[]"))
if (vim.fn.filereadable(expanded) + vim.fn.isdirectory(expanded)) == 0 then if (vim.fn.filereadable(expanded) + vim.fn.isdirectory(expanded)) == 0 then
return return
end end