[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 958c9ad: * packages/nlinum/nlinum.el (nlinum--check-narrow
From: |
Stefan Monnier |
Subject: |
[elpa] master 958c9ad: * packages/nlinum/nlinum.el (nlinum--check-narrowing): Flush the line-number-cache as well. |
Date: |
Tue, 26 Mar 2019 11:28:42 -0400 (EDT) |
branch: master
commit 958c9ad8e6a22079f343c7616b4101d0a83a9a90
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>
* packages/nlinum/nlinum.el (nlinum--check-narrowing): Flush the
line-number-cache as well.
---
packages/nlinum/nlinum.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/packages/nlinum/nlinum.el b/packages/nlinum/nlinum.el
index 99d32e7..b4066a3 100644
--- a/packages/nlinum/nlinum.el
+++ b/packages/nlinum/nlinum.el
@@ -128,8 +128,7 @@ Linum mode is a buffer-local minor mode."
(add-hook 'after-change-functions #'nlinum--after-change nil :local)
(add-hook 'pre-redisplay-functions #'nlinum--check-narrowing nil :local)
(if nlinum-highlight-current-line
- (add-hook 'post-command-hook #'nlinum--current-line-update nil :local)
- (remove-hook 'post-command-hook #'nlinum--current-line-update :local))
+ (add-hook 'post-command-hook #'nlinum--current-line-update nil :local))
(jit-lock-register #'nlinum--region :contextual))
(nlinum--setup-windows))
@@ -294,6 +293,7 @@ Linum mode is a buffer-local minor mode."
;; Note: if nlinum-widen is t the flush is still needed when
;; point-min is/was in the middle of a line.
(unless (eql nlinum--last-point-min (point-min))
+ (unless nlinum-widen (setq nlinum--line-number-cache nil))
(setq nlinum--last-point-min (point-min))
(nlinum--flush)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] master 958c9ad: * packages/nlinum/nlinum.el (nlinum--check-narrowing): Flush the line-number-cache as well.,
Stefan Monnier <=