mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 18:40:39 -08:00
Improve support of display-line-numbers in package.el
* lisp/emacs-lisp/package.el (package-menu--refresh): Redisplay the header. (Bug#27895) * lisp/emacs-lisp/tabulated-list.el (tabulated-list-line-number-width): Fix the case when display-line-numbers is nil.
This commit is contained in:
parent
5070717802
commit
2c77213738
2 changed files with 8 additions and 5 deletions
|
|
@ -191,11 +191,13 @@ Populated by `tabulated-list-init-header'.")
|
|||
;; line-number-display-width returns the value for the selected
|
||||
;; window, which might not be the window in which the current buffer
|
||||
;; is displayed.
|
||||
(let ((cbuf-window (get-buffer-window (current-buffer))))
|
||||
(if (window-live-p cbuf-window)
|
||||
(with-selected-window cbuf-window
|
||||
(+ (line-number-display-width) 2))
|
||||
(if display-line-numbers 4 0))))
|
||||
(if (not display-line-numbers)
|
||||
0
|
||||
(let ((cbuf-window (get-buffer-window (current-buffer))))
|
||||
(if (window-live-p cbuf-window)
|
||||
(with-selected-window cbuf-window
|
||||
(+ (line-number-display-width) 2))
|
||||
4))))
|
||||
|
||||
(defun tabulated-list-init-header ()
|
||||
"Set up header line for the Tabulated List buffer."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue