From 0d9d78f44ee99543fbb6f9bd3c00677e6ce9ba70 Mon Sep 17 00:00:00 2001 From: MitchMarq42 Date: Wed, 14 Dec 2022 22:26:37 -0900 Subject: [PATCH] line numbers ACTUALLY refresh all the time --- lisp/mitch-packages.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/mitch-packages.el b/lisp/mitch-packages.el index b537bf5..213a468 100644 --- a/lisp/mitch-packages.el +++ b/lisp/mitch-packages.el @@ -349,6 +349,8 @@ targets." :hook (prog-mode . nlinum-relative-mode) :init (defun mitch/nlinum-buffer-setup () + (nlinum-relative-mode -1) + (nlinum-relative-mode 99) (setq nlinum-format-function (lambda (line width) (let* ((line-display (abs (- line nlinum-relative--current-line))) @@ -373,7 +375,7 @@ targets." str))) (setq-local nlinum--width (length (number-to-string (line-number-at-pos (point-max)))))) - (add-hook 'minibuffer-exit-hook #'mitch/nlinum-buffer-setup)) + (add-hook 'focus-in-hook #'mitch/nlinum-buffer-setup)) ;; broken terminal that doesn't compile but at least it's fast when it does (elpaca-use-package vterm