mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
Polyfill line-number-display-width for Emacs 25
Fixes void-function line-number-display-width errors (used in company-pseudo-tooltip-frontend).
This commit is contained in:
@ -50,6 +50,13 @@ When `display-line-numbers-mode' is turned on,
|
|||||||
to display all line numbers in the buffer."
|
to display all line numbers in the buffer."
|
||||||
:type 'boolean)
|
:type 'boolean)
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun line-number-display-width ()
|
||||||
|
"Return the width used for displaying line numbers in the
|
||||||
|
selected window."
|
||||||
|
(length (save-excursion (goto-char (point-max))
|
||||||
|
(format-mode-line "%l"))))
|
||||||
|
|
||||||
(defun display-line-numbers-update-width ()
|
(defun display-line-numbers-update-width ()
|
||||||
"Prevent the line number width from shrinking."
|
"Prevent the line number width from shrinking."
|
||||||
(let ((width (line-number-display-width)))
|
(let ((width (line-number-display-width)))
|
||||||
|
Reference in New Issue
Block a user