* lisp/vc/smerge-mode.el (smerge-match-conflict): Fix bug#38456

This situation is not an internal error, but a perfectly normal occurrence,
so a `cl-assert` is not right
This commit is contained in:
Stefan Monnier 2020-01-21 15:58:17 -05:00
parent 7e37e61f4b
commit ac09e8e121

View file

@ -797,7 +797,10 @@ An error is raised if not inside a conflict."
(filename (or (match-string 1) ""))
(_ (re-search-forward smerge-end-re))
(_ (cl-assert (< orig-point (match-end 0))))
(_ (when (< (match-end 0) orig-point)
;; Point is not within the conflict we found,
;; so this conflict is not ours.
(signal 'search-failed (list smerge-begin-re))))
(lower-end (match-beginning 0))
(end (match-end 0))