fix(previewer): regression on live_grep (#2119)

This commit is contained in:
Fabian David Schmidt
2022-08-09 13:02:21 +02:00
committed by GitHub
parent 787db424e3
commit 8f80e82108

View File

@@ -462,8 +462,8 @@ previewers.vimgrep = defaulter(function(opts)
end, end,
define_preview = function(self, entry, status) define_preview = function(self, entry, status)
-- bypass path validation for terminal buffers that don't have appropriate path -- builtin.buffers: bypass path validation for terminal buffers that don't have appropriate path
local has_buftype = vim.api.nvim_buf_get_option(entry.bufnr, "buftype") ~= "" local has_buftype = entry.bufnr and vim.api.nvim_buf_get_option(entry.bufnr, "buftype") ~= "" or false
local p local p
if not has_buftype then if not has_buftype then
p = from_entry.path(entry, true) p = from_entry.path(entry, true)