summary refs log tree commit diff stats
path: root/user
diff options
context:
space:
mode:
Diffstat (limited to 'user')
-rw-r--r--user/emacs/init.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el
index e19f8eb1..f2c7bfca 100644
--- a/user/emacs/init.el
+++ b/user/emacs/init.el
@@ -128,11 +128,13 @@
 
 (defun noct-relative ()
   "Show relative line numbers."
-  (setq-local display-line-numbers 'relative))
+  (when display-line-numbers
+    (setq-local display-line-numbers 'relative)))
 
 (defun noct-absolute ()
   "Show absolute line numbers."
-  (setq-local display-line-numbers t))
+  (when display-line-numbers
+    (setq-local display-line-numbers t)))
 
 (add-hook 'evil-insert-state-entry-hook #'noct-absolute)
 (add-hook 'evil-insert-state-exit-hook #'noct-relative)