Commit 9160906f authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(Freplace_match): Set OPOINT clearly for the case

where point is in the middle of the text to be replaced.
parent f1a64115
......@@ -2417,8 +2417,10 @@ since only regular expressions have distinguished subexpressions.")
/* 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;
opoint = PT;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment