diff options
Diffstat (limited to 'modules/lua/commands.lua')
-rw-r--r-- | modules/lua/commands.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/lua/commands.lua b/modules/lua/commands.lua index 0b918087..47e872e0 100644 --- a/modules/lua/commands.lua +++ b/modules/lua/commands.lua @@ -55,11 +55,10 @@ function goto_required() end if not file then return end file = file:sub(2, -2):gsub('%.', '/') + local lfs = require 'lfs' for path in package.path:gmatch('[^;]+') do path = path:gsub('?', file) - local f = io.open(path) - if f then - f:close() + if lfs.attributes(file) then textadept.io.open(path) break end |