File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1454,7 +1454,8 @@ builtin.buffers({opts}) *telescope.builtin.buffers()*
14541454 {cwd} (string) specify a working directory to
14551455 filter buffers list by
14561456 {show_all_buffers} (boolean) if true, show all buffers,
1457- including unloaded buffers
1457+ including unloaded buffers and
1458+ unlisted buffers
14581459 (default: true)
14591460 {ignore_current_buffer} (boolean) if true, don't show the current
14601461 buffer in the list (default:
Original file line number Diff line number Diff line change @@ -926,13 +926,17 @@ internal.buffers = function(opts)
926926 opts = apply_cwd_only_aliases (opts )
927927
928928 local bufnrs = vim .tbl_filter (function (bufnr )
929- if 1 ~= vim .fn .buflisted (bufnr ) then
930- return false
931- end
932- -- only hide unloaded buffers if opts.show_all_buffers is false, keep them listed if true or nil
933- if opts .show_all_buffers == false and not api .nvim_buf_is_loaded (bufnr ) then
934- return false
929+ -- only hide unlisted and unloaded buffers if opts.show_all_buffers is
930+ -- false, keep them listed if true or nil
931+ if opts .show_all_buffers == false then
932+ if 1 ~= vim .fn .buflisted (bufnr ) then
933+ return false
934+ end
935+ if not api .nvim_buf_is_loaded (bufnr ) then
936+ return false
937+ end
935938 end
939+
936940 if opts .ignore_current_buffer and bufnr == api .nvim_get_current_buf () then
937941 return false
938942 end
You can’t perform that action at this time.
0 commit comments