From 205790285b3e4e933ab85eee62b1b515243a40bc Mon Sep 17 00:00:00 2001 From: Senghan Bright Date: Wed, 16 Dec 2020 21:36:50 +0100 Subject: [PATCH] fix: don't error when no hidden buffers are available (#341) --- lua/telescope/builtin/internal.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/telescope/builtin/internal.lua b/lua/telescope/builtin/internal.lua index 00868bb..7329a50 100644 --- a/lua/telescope/builtin/internal.lua +++ b/lua/telescope/builtin/internal.lua @@ -437,6 +437,7 @@ internal.buffers = function(opts) or vim.api.nvim_buf_is_loaded(b)) and 1 == vim.fn.buflisted(b) end, vim.api.nvim_list_bufs()) + if not next(bufnrs) then return end local buffers = {} local default_selection_idx = 1