From c061c216bfe082384d542a487ce02e9aed6177df Mon Sep 17 00:00:00 2001 From: Luke Kershaw <35707277+l-kershaw@users.noreply.github.com> Date: Sun, 9 May 2021 21:17:39 +0100 Subject: [PATCH] fix: add check for nil win_id in Picker.close_windows (#831) This probably fixes issues with nobuflisted buffers (startify, dashboard-nvim and probably more) --- lua/telescope/pickers.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/telescope/pickers.lua b/lua/telescope/pickers.lua index aceea8b..60d3802 100644 --- a/lua/telescope/pickers.lua +++ b/lua/telescope/pickers.lua @@ -502,7 +502,7 @@ function Picker.close_windows(status) local preview_border_win = status.preview_border_win local function del_win(name, win_id, force, bdelete) - if not vim.api.nvim_win_is_valid(win_id) then + if win_id == nil or not vim.api.nvim_win_is_valid(win_id) then return end