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

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

[nongnu] elpa/helm ba518fda86 2/6: Forward line on empty lines in mm-sea


From: ELPA Syncer
Subject: [nongnu] elpa/helm ba518fda86 2/6: Forward line on empty lines in mm-search, otherwise goto eol
Date: Wed, 13 Sep 2023 15:59:51 -0400 (EDT)

branch: elpa/helm
commit ba518fda8672bb0b168228d51dd1687cd6c29403
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>

    Forward line on empty lines in mm-search, otherwise goto eol
---
 helm-multi-match.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/helm-multi-match.el b/helm-multi-match.el
index bfe5287fd0..c183f0ba5a 100644
--- a/helm-multi-match.el
+++ b/helm-multi-match.el
@@ -266,10 +266,15 @@ i.e (identity (re-search-forward \"foo\" (pos-eol) t)) => 
t."
                               (funcall pred (condition-case _err
                                                 (funcall searchfn2 regexp eol 
t)
                                               (invalid-regexp nil)))))
-           do (goto-char eol) and return t
-           else do (goto-char eol)
+           do (helm-mm-3--search-move-forward bol eol) and return t
+           else do (helm-mm-3--search-move-forward bol eol)
            finally return nil))
 
+(defun helm-mm-3--search-move-forward (bol eol)
+  "Move point forward for next search.
+Forward line on empty lines, otherwise goto eol."
+  (if (eql bol eol) (forward-line 1) (goto-char eol)))
+
 (defun helm-mm-3-search (pattern &rest _ignore)
   (helm-mm-3-search-base
    pattern 're-search-forward 're-search-forward))



reply via email to

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