diff options
| -rw-r--r-- | src/xdisp.c | 42 |
1 files changed, 10 insertions, 32 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 82f24551f19..a50018f1596 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -12968,6 +12968,8 @@ redisplay_window (window, just_this_one_p) | |||
| 12968 | w->force_start = Qt; | 12968 | w->force_start = Qt; |
| 12969 | } | 12969 | } |
| 12970 | 12970 | ||
| 12971 | force_start: | ||
| 12972 | |||
| 12971 | /* Handle case where place to start displaying has been specified, | 12973 | /* Handle case where place to start displaying has been specified, |
| 12972 | unless the specified location is outside the accessible range. */ | 12974 | unless the specified location is outside the accessible range. */ |
| 12973 | if (!NILP (w->force_start) | 12975 | if (!NILP (w->force_start) |
| @@ -13147,39 +13149,15 @@ redisplay_window (window, just_this_one_p) | |||
| 13147 | than a simple mouse-click. */ | 13149 | than a simple mouse-click. */ |
| 13148 | if (NILP (w->start_at_line_beg) | 13150 | if (NILP (w->start_at_line_beg) |
| 13149 | && NILP (do_mouse_tracking) | 13151 | && NILP (do_mouse_tracking) |
| 13150 | && CHARPOS (startp) > BEGV) | 13152 | && CHARPOS (startp) > BEGV |
| 13153 | && CHARPOS (startp) > BEG + save_beg_unchanged | ||
| 13154 | && CHARPOS (startp) <= Z - save_end_unchanged) | ||
| 13151 | { | 13155 | { |
| 13152 | #if 0 | 13156 | w->force_start = Qt; |
| 13153 | /* The following code tried to make BEG_UNCHANGED and | 13157 | if (XMARKER (w->start)->buffer == current_buffer) |
| 13154 | END_UNCHANGED up to date (similar to try_window_id). | 13158 | compute_window_start_on_continuation_line (w); |
| 13155 | Is it important to do so? | 13159 | SET_TEXT_POS_FROM_MARKER (startp, w->start); |
| 13156 | 13160 | goto force_start; | |
| 13157 | The trouble is that it's a little too strict when it | ||
| 13158 | comes to overlays: modify_overlay can call | ||
| 13159 | BUF_COMPUTE_UNCHANGED, which alters BUF_BEG_UNCHANGED and | ||
| 13160 | BUF_END_UNCHANGED directly without moving the gap. | ||
| 13161 | |||
| 13162 | This can result in spurious recentering when overlays are | ||
| 13163 | altered in the buffer. So unless it's proven necessary, | ||
| 13164 | let's leave this commented out for now. -- cyd. */ | ||
| 13165 | if (MODIFF > SAVE_MODIFF | ||
| 13166 | || BEG_UNCHANGED + END_UNCHANGED > Z_BYTE) | ||
| 13167 | { | ||
| 13168 | if (GPT - BEG < BEG_UNCHANGED) | ||
| 13169 | BEG_UNCHANGED = GPT - BEG; | ||
| 13170 | if (Z - GPT < END_UNCHANGED) | ||
| 13171 | END_UNCHANGED = Z - GPT; | ||
| 13172 | } | ||
| 13173 | #endif | ||
| 13174 | |||
| 13175 | if (CHARPOS (startp) > BEG + save_beg_unchanged | ||
| 13176 | && CHARPOS (startp) <= Z - save_end_unchanged) | ||
| 13177 | { | ||
| 13178 | /* There doesn't seems to be a simple way to find a new | ||
| 13179 | window start that is near the old window start, so | ||
| 13180 | we just recenter. */ | ||
| 13181 | goto recenter; | ||
| 13182 | } | ||
| 13183 | } | 13161 | } |
| 13184 | 13162 | ||
| 13185 | #if GLYPH_DEBUG | 13163 | #if GLYPH_DEBUG |