diff options
| author | Chong Yidong | 2007-08-06 17:25:30 +0000 |
|---|---|---|
| committer | Chong Yidong | 2007-08-06 17:25:30 +0000 |
| commit | 515403013d6f1f31d3d574b9513a08f32b568c4c (patch) | |
| tree | e6caca69d27243659f8bc577e0be51f27c27c2c9 /src | |
| parent | 32bfce5d41eb45406cef4e54b7126e956ba65735 (diff) | |
| download | emacs-515403013d6f1f31d3d574b9513a08f32b568c4c.tar.gz emacs-515403013d6f1f31d3d574b9513a08f32b568c4c.zip | |
(redisplay_window): When restoring original buffer position, make sure
it is still valid.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 14a55720877..a565c43223d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -13520,7 +13520,10 @@ redisplay_window (window, just_this_one_p) | |||
| 13520 | /* Restore current_buffer and value of point in it. */ | 13520 | /* Restore current_buffer and value of point in it. */ |
| 13521 | TEMP_SET_PT_BOTH (CHARPOS (opoint), BYTEPOS (opoint)); | 13521 | TEMP_SET_PT_BOTH (CHARPOS (opoint), BYTEPOS (opoint)); |
| 13522 | set_buffer_internal_1 (old); | 13522 | set_buffer_internal_1 (old); |
| 13523 | TEMP_SET_PT_BOTH (CHARPOS (lpoint), BYTEPOS (lpoint)); | 13523 | /* Avoid an abort in TEMP_SET_PT_BOTH if the buffer has become |
| 13524 | shorter. This can be caused by log truncation in *Messages*. */ | ||
| 13525 | if (CHARPOS (lpoint) <= ZV) | ||
| 13526 | TEMP_SET_PT_BOTH (CHARPOS (lpoint), BYTEPOS (lpoint)); | ||
| 13524 | 13527 | ||
| 13525 | unbind_to (count, Qnil); | 13528 | unbind_to (count, Qnil); |
| 13526 | } | 13529 | } |