changeset 23790:c1dbb92db43e

(Freplace_match): Set OPOINT clearly for the case where point is in the middle of the text to be replaced.
author Richard M. Stallman <rms@gnu.org>
date Tue, 01 Dec 1998 05:17:11 +0000
parents 7d763e90da82
children 364d36c8f631
files src/search.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;