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

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

[nongnu] elpa/iedit 7ed8e04557 021/301: Optmize iedit-hide-unmatched-lin


From: ELPA Syncer
Subject: [nongnu] elpa/iedit 7ed8e04557 021/301: Optmize iedit-hide-unmatched-lines
Date: Mon, 10 Jan 2022 22:58:46 -0500 (EST)

branch: elpa/iedit
commit 7ed8e045579dee626f3bc8c6131959c40efc1e31
Author: Victor Ren <victorhge@gmail.com>
Commit: Victor Ren <victorhge@gmail.com>

    Optmize iedit-hide-unmatched-lines
---
 iedit.el | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/iedit.el b/iedit.el
index a1759457c2..7b6b3650f4 100644
--- a/iedit.el
+++ b/iedit.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2010, 2011, 2012 Victor Ren
 
-;; Time-stamp: <2012-01-21 11:52:29 Victor Ren>
+;; Time-stamp: <2012-01-21 14:12:53 Victor Ren>
 ;; Author: Victor Ren <victorhge@gmail.com>
 ;; Keywords: occurrence region replace simultaneous
 ;; Version: 0.91
@@ -329,15 +329,12 @@ Commands:
         (unmatched-lines nil))
     (save-excursion
       (dolist (overlay iedit-occurrences-overlays)
-        (let ((match-start (overlay-start overlay))
-              (match-end (overlay-end overlay)))
-          (goto-char match-start)
-          (if (> (line-beginning-position) (1+ prev-occurrence-end))
-              (let ((unmatch-start (1+ prev-occurrence-end))
-                    (unmatch-end (1- (line-beginning-position))))
-                (push  (list unmatch-start unmatch-end) unmatched-lines)))
-          (goto-char match-end)
-          (setq prev-occurrence-end (line-end-position))))
+        (goto-char (overlay-start overlay))
+        (let ((line-beginning (line-beginning-position)))
+          (if (> line-beginning (1+ prev-occurrence-end))
+              (push  (list (1+ prev-occurrence-end) (1- line-beginning)) 
unmatched-lines)))
+        (goto-char (overlay-end overlay))
+        (setq prev-occurrence-end (line-end-position)))
       (if (< prev-occurrence-end (point-max))
           (push (list (1+ prev-occurrence-end) (point-max)) unmatched-lines))
       (when unmatched-lines



reply via email to

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