Fix linum bug when making new frames

This commit is contained in:
Henrik Lissner 2016-05-24 22:50:39 -04:00
parent 123a1755e4
commit 384b775ace

View File

@ -156,9 +156,14 @@
(add-hook! 'nlinum-mode-hook
(add-hook 'post-command-hook 'doom|nlinum-hl-line nil t))
:config
;; Calculate line number column width
(add-hook! nlinum-mode
(setq nlinum--width (length (save-excursion (goto-char (point-max))
(format-mode-line "%l"))))))
(format-mode-line "%l")))))
;; Disable nlinum when making frames, otherwise we get linum face error
;; messages that prevent frame creation.
(add-hook 'before-make-frame-hook 'doom|nlinum-disable)
(add-hook 'after-make-frame-functions 'doom|nlinum-enable))
;;