1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-02 02:10:46 -08:00

(Freplace_match): Set OPOINT clearly for the case

where point is in the middle of the text to be replaced.
This commit is contained in:
Richard M. Stallman 1998-12-01 05:17:11 +00:00
parent f1a6411580
commit 9160906f27

View file

@ -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;
else
opoint = PT;