Do not signal error in case of exactly one match

This commit is contained in:
Matus Goljer 2018-09-13 14:49:59 +02:00
parent 6a7c3c0853
commit e322b75297

View File

@ -396,7 +396,7 @@ With zero ARG, skip the last one and mark next."
(while (search-forward search end t) (while (search-forward search end t)
(push-mark (match-beginning 0)) (push-mark (match-beginning 0))
(mc/create-fake-cursor-at-point)) (mc/create-fake-cursor-at-point))
(let ((first (mc/furthest-cursor-before-point))) (let ((first (car (mc/all-fake-cursors))))
(if (not first) (if (not first)
(error "Search failed for %S" search) (error "Search failed for %S" search)
(mc/pop-state-from-overlay first))) (mc/pop-state-from-overlay first)))