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

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

[elpa] externals/embark 8460d47768 3/3: Fix bug in zebra striping


From: ELPA Syncer
Subject: [elpa] externals/embark 8460d47768 3/3: Fix bug in zebra striping
Date: Mon, 28 Mar 2022 20:57:29 -0400 (EDT)

branch: externals/embark
commit 8460d47768cba7b0019c59f4007120bd94109a1b
Author: Omar Antolín <omar.antolin@gmail.com>
Commit: Omar Antolín <omar.antolin@gmail.com>

    Fix bug in zebra striping
    
    It's telling no-one had noticed this. :P
    
    I introduced a bug here when I made it so forward-button skipped over 
annotations.
---
 embark.el | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/embark.el b/embark.el
index fc68ec0ef0..29d8b4fa67 100644
--- a/embark.el
+++ b/embark.el
@@ -2708,19 +2708,18 @@ embark collect direct action minor mode by adding the 
function
   (save-excursion
     (goto-char (point-min))
     (when (overlays-at (point)) (forward-line))
-    (let ((columns (length tabulated-list-format)))
-      (while (not (eobp))
-        (condition-case nil
-            (forward-button columns)
-          (user-error (goto-char (point-max))))
-        (unless (eobp)
-          (let ((pt (point)))
-            (condition-case nil
-                (forward-button columns)
-              (user-error (goto-char (point-max))))
-            (let ((stripe (make-overlay pt (point))))
-              (overlay-put stripe 'priority -100) ; below hl-line-mode's -50
-              (overlay-put stripe 'face 'embark-collect-zebra-highlight))))))))
+    (while (not (eobp))
+      (condition-case nil
+          (forward-button 1)
+        (user-error (goto-char (point-max))))
+      (unless (eobp)
+        (let ((pt (point)))
+          (condition-case nil
+              (forward-button 1)
+            (user-error (goto-char (point-max))))
+          (let ((stripe (make-overlay pt (point))))
+            (overlay-put stripe 'priority -100) ; below hl-line-mode's -50
+            (overlay-put stripe 'face 'embark-collect-zebra-highlight)))))))
 
 (define-minor-mode embark-collect-zebra-minor-mode
   "Minor mode to highlight alternate rows in an Embark Collect buffer.



reply via email to

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