Adjust linum gutter to accomodate text-size changes
This commit is contained in:
parent
0d70306b90
commit
8eac8c4ecf
|
@ -1034,6 +1034,15 @@ is nonempty."
|
|||
(when (or 'linum-mode global-linum-mode)
|
||||
(linum-mode 0)))
|
||||
|
||||
(defun linum-update-window-scale-fix (win)
|
||||
"Fix linum for scaled text in the window WIN."
|
||||
(set-window-margins win
|
||||
(ceiling (* (if (boundp 'text-scale-mode-step)
|
||||
(expt text-scale-mode-step
|
||||
text-scale-mode-amount) 1)
|
||||
(if (car (window-margins))
|
||||
(car (window-margins)) 1)))))
|
||||
|
||||
|
||||
;; Generalized next-error system ("gne")
|
||||
|
||||
|
|
|
@ -239,7 +239,8 @@
|
|||
(spacemacs|add-toggle line-numbers
|
||||
:mode linum-mode
|
||||
:documentation "Show the line numbers."
|
||||
:evil-leader "tn"))
|
||||
:evil-leader "tn")
|
||||
(advice-add #'linum-update-window :after #'linum-update-window-scale-fix))
|
||||
|
||||
(defun spacemacs-base/init-occur-mode ()
|
||||
(evilified-state-evilify-map occur-mode-map
|
||||
|
|
Loading…
Reference in a new issue