branch: elpa/helm
commit ba518fda8672bb0b168228d51dd1687cd6c29403
Author: Thierry Volpiatto <thie...@posteo.net>
Commit: Thierry Volpiatto <thie...@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