Skip to content

Commit 03eed63

Browse files
phanenibhagwan
authored andcommitted
fix: {q} may be expanded to nothing rather than '' on windows
1 parent 9b433db commit 03eed63

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lua/fzf-lua/previewer/builtin.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,8 @@ function Previewer.base:cmdline(_)
403403
local entry, query, idx = items[1], items[2], items[3]
404404
-- NOTE: see comment regarding {n} in `core.convert_exec_silent_actions`
405405
if not tonumber(idx) then entry = nil end
406-
assert(type(query) == "string")
407-
self.opts._last_query = query
406+
-- on windows, query may not be expanded to a string: #1887
407+
self.opts._last_query = query or ""
408408
-- convert empty string to nil
409409
self:display_entry(entry)
410410
return ""

0 commit comments

Comments
 (0)