summaryrefslogtreecommitdiff
path: root/lua/telescope/builtin/internal.lua
diff options
context:
space:
mode:
authorBen Smith <37027883+smithbm2316@users.noreply.github.com>2021-05-31 02:12:18 +0000
committerGitHub <noreply@github.com>2021-05-30 22:12:18 -0400
commit654b11aa08e54255a55625e6bca514b9659b7896 (patch)
treef14eae169bd6dac22c89f764a02523a8fbe32dc9 /lua/telescope/builtin/internal.lua
parent517f4b204bbb9d9e0262648f3cbf5820ea14c8f0 (diff)
Change the `show_all_buffers` option to true by default for `buffers` picker (#858)
* show_all_buffers true by default, added docs * [docgen] Update doc/telescope.txt skip-checks: true * fix for docs, used param instead of field oops * [docgen] Update doc/telescope.txt skip-checks: true Co-authored-by: Github Actions <actions@github>
Diffstat (limited to 'lua/telescope/builtin/internal.lua')
-rw-r--r--lua/telescope/builtin/internal.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/lua/telescope/builtin/internal.lua b/lua/telescope/builtin/internal.lua
index 2c4695f..6235ddf 100644
--- a/lua/telescope/builtin/internal.lua
+++ b/lua/telescope/builtin/internal.lua
@@ -563,7 +563,8 @@ internal.buffers = function(opts)
if 1 ~= vim.fn.buflisted(b) then
return false
end
- if not opts.show_all_buffers and not vim.api.nvim_buf_is_loaded(b) then
+ -- only hide unloaded buffers if opts.show_all_buffers is false, keep them listed if true or nil
+ if opts.show_all_buffers == false and not vim.api.nvim_buf_is_loaded(b) then
return false
end
if opts.ignore_current_buffer and b == vim.api.nvim_get_current_buf() then