From 64a674dcc9bb6ab53f90823158d1d31648dece2b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 30 Jan 2018 01:18:18 -0500 Subject: [PATCH] Fix nlinum-relative line numbering #376 Fixed padding; now relative line numbers look consistent with its non-relative counterpart. --- core/autoload/ui.el | 4 ++-- core/core-ui.el | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/autoload/ui.el b/core/autoload/ui.el index 35e84485a..26896ec0a 100644 --- a/core/autoload/ui.el +++ b/core/autoload/ui.el @@ -32,8 +32,8 @@ Uses `display-line-numbers' in Emacs 26+ and `nlinum-mode' everywhere else." (setq display-line-numbers next)) ((featurep 'nlinum) (pcase next - (`t (nlinum-relative-mode -1) (nlinum-mode +1)) - (`relative (nlinum-relative-mode +1)) + (`t (nlinum-relative-off) (nlinum-mode +1)) + (`relative (nlinum-relative-on)) (`nil (nlinum-mode -1)))) (t (error "No line number plugin detected"))))) diff --git a/core/core-ui.el b/core/core-ui.el index eda1a12ff..a69959d21 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -416,7 +416,9 @@ character that looks like a space that `whitespace-mode' won't affect.") (def-package! nlinum-relative :unless (boundp 'display-line-numbers) :commands nlinum-relative-mode - :config (after! evil (nlinum-relative-setup-evil))) + :config + (setq nlinum-format " %d ") + (after! evil (nlinum-relative-setup-evil))) ;;