diff options
| author | Richard M. Stallman | 1998-12-01 05:17:11 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-12-01 05:17:11 +0000 |
| commit | 9160906f27f60f33916004ea241d84cd3fb178d0 (patch) | |
| tree | 7bfc86d3a79d1c9e774efd1def42655e45c473cb /src/search.c | |
| parent | f1a64115804be490625d21880e0e22f4b382adbd (diff) | |
| download | emacs-9160906f27f60f33916004ea241d84cd3fb178d0.tar.gz emacs-9160906f27f60f33916004ea241d84cd3fb178d0.zip | |
(Freplace_match): Set OPOINT clearly for the case
where point is in the middle of the text to be replaced.
Diffstat (limited to 'src/search.c')
| -rw-r--r-- | src/search.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/search.c b/src/search.c index 29a6fe4ff4f..e4877b5f498 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -2417,8 +2417,10 @@ since only regular expressions have distinguished subexpressions.") | |||
| 2417 | } | 2417 | } |
| 2418 | 2418 | ||
| 2419 | /* Record point, the move (quietly) to the start of the match. */ | 2419 | /* Record point, the move (quietly) to the start of the match. */ |
| 2420 | if (PT > search_regs.start[sub]) | 2420 | if (PT >= search_regs.end[sub]) |
| 2421 | opoint = PT - ZV; | 2421 | opoint = PT - ZV; |
| 2422 | else if (PT > search_regs.start[sub]) | ||
| 2423 | opoint = search_regs.end[sub] - ZV; | ||
| 2422 | else | 2424 | else |
| 2423 | opoint = PT; | 2425 | opoint = PT; |
| 2424 | 2426 | ||