branch: elpa/evil-goggles
commit 04b93b8564177c9da6366a6db3c6daf8e03e2bcb
Author: Evgeni Kolev <[email protected]>
Commit: Evgeni Kolev <[email protected]>

    Use alternative pulse duration calculation
    
    With this change the number of iterations is kept the same (always 10)
    and the number of iterations are tweaked instead. This works better
    since pulse.el doesn't have (or use) enough color shades and runs out
    of shades by the 10th iteration.
---
 evil-goggles.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/evil-goggles.el b/evil-goggles.el
index 3b22f2958e..40f0dff1bc 100644
--- a/evil-goggles.el
+++ b/evil-goggles.el
@@ -100,8 +100,8 @@ can't work with input such as (backgound . \"red\")."
 
 This function returns immediately, it doesn't wait for the pulse
 animation to end."
-  (let* ((pulse-delay 0.03)
-         (pulse-iterations (round dur pulse-delay)))
+  (let* ((pulse-iterations 10)
+         (pulse-delay (/ (float dur) pulse-iterations) ))
     (ignore pulse-iterations) ;; silence compile warning Unused lexical 
variable
     (set-face-attribute 'evil-goggles--pulse-face nil :background background)
     (pulse-momentary-highlight-overlay ov 'evil-goggles--pulse-face)))

Reply via email to