Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add consult--source-tab-buffer #1009

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions consult.el
Original file line number Diff line number Diff line change
Expand Up @@ -4587,6 +4587,22 @@ If NORECORD is non-nil, do not record the buffer switch in the buffer list."
:as #'consult--buffer-pair)))
"Buffer candidate source for `consult-buffer'.")

(defvar consult--source-tab-buffer
brsvh marked this conversation as resolved.
Show resolved Hide resolved
`(:name "Tab buffer"
:narrow ?b
:category buffer
:face consult-buffer
:history buffer-name-history
:state ,#'consult--buffer-state
:enabled (lambda () tab-bar-mode)
:items
,(lambda ()
(consult--buffer-query
:sort 'visibility
:as #'consult--buffer-pair
:buffer-list (frame-parameter nil 'buffer-list))))
"Buffer candidate source in current tab for `consult-buffer'.")

(defun consult--file-register-p (reg)
"Return non-nil if REG is a file register."
(memq (car-safe (cdr reg)) '(file-query file)))
Expand Down