Show a directory entry

:Locate returns directories and its sink opens them, but the readable-file
guard made the key silently do nothing for one.
This commit is contained in:
Junegunn Choi
2026-08-27 00:02:54 +09:00
parent a92f1cce23
commit 5a9f08fb36
+2 -1
View File
@@ -771,7 +771,8 @@ function! s:goto_entry(winid, bufnr, dir, kind, entry) abort
call add(cmds, 'normal! zvzz')
else
let path = s:in_dir(a:dir, entry)
if !filereadable(path)
" :Locate and a custom source can return a directory, which the sink opens
if !filereadable(path) && !isdirectory(path)
return
endif
let cmds = s:edit_cmds(a:winid, path)