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

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

[elpa] master b1c1f7e 32/50: new option: on-screen-drawing-threshold


From: Michael Heerdegen
Subject: [elpa] master b1c1f7e 32/50: new option: on-screen-drawing-threshold
Date: Mon, 09 Nov 2015 03:35:50 +0000

branch: master
commit b1c1f7e7d356ba297b84db873bc6f952706af055
Author: Michael Heerdegen <address@hidden>
Commit: Michael Heerdegen <address@hidden>

    new option: on-screen-drawing-threshold
---
 on-screen.el |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/on-screen.el b/on-screen.el
index d80b9c4..b65cb37 100644
--- a/on-screen.el
+++ b/on-screen.el
@@ -230,6 +230,12 @@ a non-nil value may make scrolling stuttering on slow 
computers."
                  (float :tag "Count lines with hidden part less than this as 
visible"
                        :value .4)))
 
+(defcustom on-screen-drawing-threshold 2
+  "If set, highlight only when scrolled at least that many lines."
+  :group 'on-screen
+  :type '(choice (const :tag "Off" nil)
+                 (integer :value 2)))
+
 ;;; Other variables
 
 (defvar on-screen-overlay-priority 30     ; > stripe buffer, < ediff, isearch
@@ -494,6 +500,9 @@ This should normally go to `window-scroll-functions'."
               (timer-set-time timer (timer-relative-time (current-time) 
on-screen-delay)))
              ((or (not area)
                   (= display-start s1)))
+             ((and (numberp on-screen-drawing-threshold)
+                   (< (abs (apply #'count-lines (sort (list display-start s1) 
#'<)))
+                      on-screen-drawing-threshold)))
              (t
               (setq
                overlays



reply via email to

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