Function: tabulated-list-line-number-width
tabulated-list-line-number-width is a byte-compiled function defined
in tabulated-list.el.gz.
Signature
(tabulated-list-line-number-width)
Documentation
Return the width taken by display-line-numbers in the current buffer.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/tabulated-list.el.gz
(defun tabulated-list-line-number-width ()
"Return the width taken by `display-line-numbers' in the current buffer."
;; line-number-display-width returns the value for the selected
;; window, which might not be the window in which the current buffer
;; is displayed.
(if (not display-line-numbers)
0
(let ((cbuf-window (get-buffer-window (current-buffer) t)))
(if (window-live-p cbuf-window)
(with-selected-window cbuf-window
(line-number-display-width 'columns))
4))))