summaryrefslogtreecommitdiff
path: root/lisp/isearch.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/isearch.el')
-rw-r--r--lisp/isearch.el7
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 717f6d46f78..7fd96df1b07 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -1244,9 +1244,9 @@ Use `isearch-exit' to quit without signaling."
(interactive)
;; (ding) signal instead below, if quitting
(discard-input)
- (if isearch-success
- ;; If search is successful, move back to starting point
- ;; and really do quit.
+ (if (and isearch-success (not isearch-error))
+ ;; If search is successful and has no incomplete regexp,
+ ;; move back to starting point and really do quit.
(progn
(setq isearch-success nil)
(isearch-cancel))
@@ -2767,5 +2767,4 @@ CASE-FOLD non-nil means the search was case-insensitive."
(isearch-search)
(isearch-update))
-;; arch-tag: 74850515-f7d8-43a6-8a2c-ca90a4c1e675
;;; isearch.el ends here