File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -102,11 +102,11 @@ function M.on_keypress(mode)
102
102
end
103
103
104
104
if node .link_to and not node .entries then
105
- lib .open_file (mode , node .relative_path )
105
+ lib .open_file (mode , utils . path_relative ( node .absolute_path , vim . fn . getcwd ( - 1 , 0 )) )
106
106
elseif node .entries ~= nil then
107
107
lib .unroll_dir (node )
108
108
else
109
- lib .open_file (mode , node .relative_path )
109
+ lib .open_file (mode , utils . path_relative ( node .absolute_path , vim . fn . getcwd ( - 1 , 0 )) )
110
110
end
111
111
end
112
112
@@ -148,16 +148,13 @@ end
148
148
function M .find_file (with_open )
149
149
local bufname = vim .fn .bufname ()
150
150
local filepath = vim .fn .fnamemodify (bufname , ' :p' )
151
+ if not is_file_readable (filepath ) or vim .fn .isdirectory (filepath ) == 1 then return end
151
152
152
153
if with_open then
153
154
M .open ()
154
155
view .focus ()
155
- if not is_file_readable (filepath ) then return end
156
- lib .set_index_and_redraw (filepath )
157
- return
158
156
end
159
157
160
- if not is_file_readable (filepath ) then return end
161
158
lib .set_index_and_redraw (filepath )
162
159
end
163
160
You can’t perform that action at this time.
0 commit comments