diff options
author | Eli Zaretskii <eliz@gnu.org> | 2017-08-19 13:52:02 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2017-08-19 13:52:02 +0300 |
commit | 5070717802d9be51085d187a10a5f4930b9a1471 (patch) | |
tree | 57a3b040c6bdbbedeaceb63bf6913c77395498ab /lisp/emacs-lisp | |
parent | 1e2fbb5e6345591cfe618fea90ac1ff8f82f3d33 (diff) | |
download | emacs-5070717802d9be51085d187a10a5f4930b9a1471.tar.gz emacs-5070717802d9be51085d187a10a5f4930b9a1471.tar.bz2 emacs-5070717802d9be51085d187a10a5f4930b9a1471.zip |
; Fix last change
* lisp/emacs-lisp/tabulated-list.el
(tabulated-list-line-number-width): Fix last change.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/tabulated-list.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el index a0a74ce7f92..f900354b3f2 100644 --- a/lisp/emacs-lisp/tabulated-list.el +++ b/lisp/emacs-lisp/tabulated-list.el @@ -195,7 +195,7 @@ Populated by `tabulated-list-init-header'.") (if (window-live-p cbuf-window) (with-selected-window cbuf-window (+ (line-number-display-width) 2)) - 4))) + (if display-line-numbers 4 0)))) (defun tabulated-list-init-header () "Set up header line for the Tabulated List buffer." @@ -422,11 +422,12 @@ of column descriptors." (let ((beg (point)) (x (max tabulated-list-padding 0)) (ncols (length tabulated-list-format)) + (lnum-width (tabulated-list-line-number-width)) (inhibit-read-only t)) (if display-line-numbers - (setq x (+ x (tabulated-list-line-number-width)))) + (setq x (+ x lnum-width))) (if (> tabulated-list-padding 0) - (insert (make-string x ?\s))) + (insert (make-string (- x lnum-width) ?\s))) (let ((tabulated-list--near-rows ; Bind it if not bound yet (Bug#25506). (or (bound-and-true-p tabulated-list--near-rows) (list (or (tabulated-list-get-entry (point-at-bol 0)) |