emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] scratch/jit-lock-antiblink d0abbf2: Consider jit-lock-anti


From: João Távora
Subject: [Emacs-diffs] scratch/jit-lock-antiblink d0abbf2: Consider jit-lock-antiblink when fontifying "on demand"
Date: Fri, 12 Jul 2019 14:43:16 -0400 (EDT)

branch: scratch/jit-lock-antiblink
commit d0abbf28576be00e33e56a6abf2e9e27ef02cb47
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>

    Consider jit-lock-antiblink when fontifying "on demand"
    
    * lisp/jit-lock.el (jit-lock-function): Consider
    jit-lock--antiblink-grace-timer.
---
 lisp/jit-lock.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el
index 7ae79f0..d881fb4 100644
--- a/lisp/jit-lock.el
+++ b/lisp/jit-lock.el
@@ -362,7 +362,11 @@ is active."
                   (or (not (eq jit-lock-defer-time 0))
                       (input-pending-p))))
        ;; No deferral.
-       (jit-lock-fontify-now start (+ start jit-lock-chunk-size))
+        (if jit-lock--antiblink-grace-timer
+            ;; If we're in the `jit-lock--antiblink-grace', do it only
+            ;; until line end
+            (jit-lock-fontify-now start (line-end-position))
+            (jit-lock-fontify-now start (+ start jit-lock-chunk-size)))
       ;; Record the buffer for later fontification.
       (unless (memq (current-buffer) jit-lock-defer-buffers)
        (push (current-buffer) jit-lock-defer-buffers))



reply via email to

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