Ignore buffers by name

Fix bug when using multiple frames, opening the which-key pane offset
numbers in other windows.
This commit is contained in:
deb0ch 2016-11-30 02:00:43 +01:00
parent 6078468da6
commit e1d803d00a

View file

@ -91,6 +91,10 @@ return a number to have it assigned to the current-window, nil otherwise."
:group 'window-numbering :group 'window-numbering
:type 'integer) :type 'integer)
(defcustom window-numbering-ignored-buffers '(" *which-key*")
"List of buffers to ignore when selecting window."
:type '(repeat string))
(defface window-numbering-face '() (defface window-numbering-face '()
"Face used for the number in the mode-line." "Face used for the number in the mode-line."
:group 'window-numbering) :group 'window-numbering)
@ -310,8 +314,7 @@ Returns the assigned number, or nil on error."
(or (not (and (frame-live-p f) (or (not (and (frame-live-p f)
(frame-visible-p f))) (frame-visible-p f)))
(string= "initial_terminal" (terminal-name f)) (string= "initial_terminal" (terminal-name f))
;; (window-numbering-ignored-p w) ;; TODO implement (member (buffer-name (window-buffer w)) window-numbering-ignored-buffers))))
)))
(cl-case window-numbering-scope (cl-case window-numbering-scope
(global (global
(cl-mapcan 'window-numbering--list-windows-in-frame (cl-mapcan 'window-numbering--list-windows-in-frame