diff options
| author | Fabian David Schmidt <39233597+fdschmidt93@users.noreply.github.com> | 2022-07-03 21:26:45 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-03 20:26:45 +0200 |
| commit | f8047b8bc9e2fdc06cc3b5d3d7701f1299f3b6e4 (patch) | |
| tree | 6cbcfd966d161c08b6f446176b950fa96c6b6081 /lua/telescope/from_entry.lua | |
| parent | 4afd1be74a3fa633cfc324de8653206a5c143470 (diff) | |
fix(from_entry): treat directories as valid paths (#2035)
Diffstat (limited to 'lua/telescope/from_entry.lua')
| -rw-r--r-- | lua/telescope/from_entry.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lua/telescope/from_entry.lua b/lua/telescope/from_entry.lua index 83e5aca..b608023 100644 --- a/lua/telescope/from_entry.lua +++ b/lua/telescope/from_entry.lua @@ -30,7 +30,9 @@ function from_entry.path(entry, validate, escape) return end - if validate and vim.fn.filereadable(path) == 0 then + -- only 0 if neither filereadable nor directory + local invalid = vim.fn.filereadable(path) + vim.fn.isdirectory(path) + if validate and invalid == 0 then return end |
