# HG changeset patch # User Richard M. Stallman # Date 912489431 0 # Node ID c1dbb92db43ef562d646c1c409ceebf1910ed558 # Parent 7d763e90da82a22d6007dbb28cb59c875afd80f5 (Freplace_match): Set OPOINT clearly for the case where point is in the middle of the text to be replaced. diff -r 7d763e90da82 -r c1dbb92db43e src/search.c --- a/src/search.c Tue Dec 01 03:58:37 1998 +0000 +++ b/src/search.c Tue Dec 01 05:17:11 1998 +0000 @@ -2417,8 +2417,10 @@ } /* Record point, the move (quietly) to the start of the match. */ - if (PT > search_regs.start[sub]) + if (PT >= search_regs.end[sub]) opoint = PT - ZV; + else if (PT > search_regs.start[sub]) + opoint = search_regs.end[sub] - ZV; else opoint = PT;