branch: externals/ivy-hydra
commit 76057b14730c56cd672d4a3987e96c37ead12c48
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
ivy-test.el (ivy--split): Add test
---
ivy-test.el | 4 +++-
ivy.el | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/ivy-test.el b/ivy-test.el
index fd0b362..d7f8d20 100644
--- a/ivy-test.el
+++ b/ivy-test.el
@@ -230,7 +230,9 @@ will bring the behavior in line with the newer Emacsen."
"your king.")))
(should (equal (ivy--split "^[^ ]") '("^[^ ]")))
(should (equal (ivy--split "^[^ ] bar") '("^[^ ]" "bar")))
- (should (equal (ivy--split "defun [^ ]+") '("defun" "[^ ]+"))))
+ (should (equal (ivy--split "defun [^ ]+") '("defun" "[^ ]+")))
+ (should (equal (ivy--split "[^ ]+ -> .*")
+ '("[^ ]+" "->" ".*"))))
(ert-deftest ivy--regex ()
(should (equal (ivy--regex
diff --git a/ivy.el b/ivy.el
index 1012860..575b446 100644
--- a/ivy.el
+++ b/ivy.el
@@ -2654,7 +2654,7 @@ regexp is passed to `regexp-quote'."
match-len)
(while (and (string-match " +" str start1)
(< start1 len))
- (if (and (> (match-beginning 0) 2)
+ (if (and (>= (match-beginning 0) 2)
(string= "[^" (substring
str
(- (match-beginning 0) 2)