emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/valign e0362c0 156/198: * valign.el (valign-region): Re


From: Stefan Monnier
Subject: [elpa] externals/valign e0362c0 156/198: * valign.el (valign-region): Report to jit-lock the actual end of fontified region.
Date: Tue, 1 Dec 2020 18:19:38 -0500 (EST)

branch: externals/valign
commit e0362c0a774de95a20cff66c664ab8f90f20d9bf
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>

    * valign.el (valign-region): Report to jit-lock the actual end of fontified 
region.
---
 valign.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/valign.el b/valign.el
index f2e587d..91f8636 100644
--- a/valign.el
+++ b/valign.el
@@ -623,7 +623,8 @@ Force align if FORCE non-nil."
   ;; We only align when this buffer is in a live window, because we
   ;; need ‘window-text-pixel-size’ to calculate text size.
   (let ((beg (or beg (point-min)))
-        (end (or end (point-max))))
+        (end (or end (point-max)))
+        (fontified-end end))
     (when (window-live-p (get-buffer-window nil (selected-frame)))
       (save-excursion
         (goto-char beg)
@@ -633,8 +634,9 @@ Force align if FORCE non-nil."
               (valign-table-maybe)
             (error (message "Error when aligning table: %s"
                             (error-message-string err))))
-          (valign--end-of-table)))))
-  (cons 'jit-lock-bounds (cons beg end)))
+          (valign--end-of-table)
+          (setq fontified-end (point)))))
+    (cons 'jit-lock-bounds (cons beg (max end fontified-end)))))
 
 (defvar valign-mode)
 (defun valign--buffer-advice (&rest _)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]