[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/nlinum 16d30cf 19/20: * packages/nlinum/nlinum.el (nlin
From: |
Stefan Monnier |
Subject: |
[elpa] externals/nlinum 16d30cf 19/20: * packages/nlinum/nlinum.el (nlinum--flush): Widen to really flush all. |
Date: |
Sat, 28 Nov 2020 18:42:26 -0500 (EST) |
branch: externals/nlinum
commit 16d30cf3ee7ce07a671f518b3f0563f3d115e5ae
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
* packages/nlinum/nlinum.el (nlinum--flush): Widen to really flush all.
---
nlinum.el | 29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/nlinum.el b/nlinum.el
index 4a726c7..4f0e02f 100644
--- a/nlinum.el
+++ b/nlinum.el
@@ -110,6 +110,7 @@ Linum mode is a buffer-local minor mode."
(remove-hook 'post-command-hook #'nlinum--current-line-update :local)
(remove-hook 'pre-redisplay-functions #'nlinum--check-narrowing :local)
(kill-local-variable 'nlinum--line-number-cache)
+ (kill-local-variable 'nlinum--last-point-min)
(remove-overlays (point-min) (point-max) 'nlinum t)
;; (kill-local-variable 'nlinum--ol-counter)
(kill-local-variable 'nlinum--width)
@@ -185,17 +186,23 @@ Linum mode is a buffer-local minor mode."
(defun nlinum--flush ()
(nlinum--setup-windows)
- ;; (kill-local-variable 'nlinum--ol-counter)
- (remove-overlays (point-min) (point-max) 'nlinum t)
- (run-with-timer 0 nil
- (lambda (buf)
- (with-current-buffer buf
- (with-silent-modifications
- ;; FIXME: only remove `fontified' on those parts of the
- ;; buffer that had an nlinum overlay!
- (remove-text-properties
- (point-min) (point-max) '(fontified)))))
- (current-buffer)))
+ (save-excursion
+ (save-restriction
+ (widen)
+ ;; (kill-local-variable 'nlinum--ol-counter)
+ (remove-overlays (point-min) (point-max) 'nlinum t)
+ (run-with-timer 0 nil
+ (lambda (buf)
+ (with-current-buffer buf
+ (with-silent-modifications
+ ;; FIXME: only remove `fontified' on those parts of
+ ;; the buffer that had an nlinum overlay!
+ (save-excursion
+ (save-restriction
+ (widen)
+ (remove-text-properties
+ (point-min) (point-max) '(fontified)))))))
+ (current-buffer)))))
(defun nlinum--current-line-update ()
"Update current line number."
- [elpa] externals/nlinum 5081418 02/20: * nlinum.el: Speed up by caching last line-number., (continued)
- [elpa] externals/nlinum 5081418 02/20: * nlinum.el: Speed up by caching last line-number., Stefan Monnier, 2020/11/28
- [elpa] externals/nlinum d7dbf4a 03/20: * nlinum.el: Add global-nlinum-mode and nlinum-format-function., Stefan Monnier, 2020/11/28
- [elpa] externals/nlinum 9a52252 07/20: Fixes: debbugs:17906, Stefan Monnier, 2020/11/28
- [elpa] externals/nlinum 02d3ccf 08/20: * nlinum.el: Use face-width if available. Hook into text-scale-mode, Stefan Monnier, 2020/11/28
- [elpa] externals/nlinum fbe07f1 09/20: * nlinum.el (nlinum--setup-window): Better preserve margin settings, Stefan Monnier, 2020/11/28
- [elpa] externals/nlinum 0ef1df7 10/20: * nlinum.el: Add highlighting of the current line, Stefan Monnier, 2020/11/28
- [elpa] externals/nlinum a4ae169 12/20: nlinum.el: Make it possible to use the right margin, Stefan Monnier, 2020/11/28
- [elpa] externals/nlinum f959610 13/20: * nlinum/nlinum.el: Don't assume nlinum-use-right-margin is fixed, Stefan Monnier, 2020/11/28
- [elpa] externals/nlinum 132ef19 04/20: * nlinum.el (nlinum-format): New custom variable., Stefan Monnier, 2020/11/28
- [elpa] externals/nlinum ba66199 06/20: * packages/nlinum/nlinum.el (nlinum--face-height): New function., Stefan Monnier, 2020/11/28
- [elpa] externals/nlinum 16d30cf 19/20: * packages/nlinum/nlinum.el (nlinum--flush): Widen to really flush all.,
Stefan Monnier <=
- [elpa] externals/nlinum 99d0fef 16/20: * packages/nlinum/nlinum.el (nlinum-widen): New custom var, Stefan Monnier, 2020/11/28
- [elpa] externals/nlinum 05d0274 17/20: * packages/nlinum/nlinum.el (nlinum--check-narrowing): Flush the line-number-cache as well., Stefan Monnier, 2020/11/28
- [elpa] externals/nlinum 5cda97a 11/20: * nlinum.el: Bump version to 1.7, Stefan Monnier, 2020/11/28
- [elpa] externals/nlinum 8fd46ee 14/20: Fix nlinum face height function (Bug#26552), Stefan Monnier, 2020/11/28
- [elpa] externals/nlinum 7b18687 15/20: * packages/nlinum/nlinum.el: Bump version to 1.8.1., Stefan Monnier, 2020/11/28
- [elpa] externals/nlinum 60d6af0 20/20: * .gitignore: New file, Stefan Monnier, 2020/11/28
- [elpa] externals/nlinum ac8059b 18/20: * packages/nlinum/nlinum.el (nlinum--check-narrowing): Reset current-line, Stefan Monnier, 2020/11/28