summaryrefslogtreecommitdiff
path: root/lua/telescope/from_entry.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/telescope/from_entry.lua')
-rw-r--r--lua/telescope/from_entry.lua13
1 files changed, 10 insertions, 3 deletions
diff --git a/lua/telescope/from_entry.lua b/lua/telescope/from_entry.lua
index bf63940..937f11f 100644
--- a/lua/telescope/from_entry.lua
+++ b/lua/telescope/from_entry.lua
@@ -12,9 +12,16 @@ local from_entry = {}
function from_entry.path(entry, validate)
local path = entry.path and vim.fn.fnameescape(entry.path) or nil
- if path == nil then path = entry.filename end
- if path == nil then path = entry.value end
- if path == nil then print("Invalid entry", vim.inspect(entry)); return end
+ if path == nil then
+ path = entry.filename
+ end
+ if path == nil then
+ path = entry.value
+ end
+ if path == nil then
+ print("Invalid entry", vim.inspect(entry))
+ return
+ end
if validate and not vim.fn.filereadable(path) then
return