diff options
| author | Eli Zaretskii | 2011-08-26 13:07:06 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2011-08-26 13:07:06 +0300 |
| commit | c11821d4e12c2346668ded2353f4fac050af817f (patch) | |
| tree | a24297c7a512ce22497a6cdb4dd234734a50f5cb /src | |
| parent | f8ccf16762e094505989b9d60fab2cc24d117daa (diff) | |
| download | emacs-c11821d4e12c2346668ded2353f4fac050af817f.tar.gz emacs-c11821d4e12c2346668ded2353f4fac050af817f.zip | |
Fix bug #9324 with unwarranted repositioning of point.
src/xdisp.c (redisplay_window): Don't force window start if point
will be invisible in the resulting window.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/xdisp.c | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 149753a6749..9429064f371 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-08-26 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * xdisp.c (redisplay_window): Don't force window start if point | ||
| 4 | will be invisible in the resulting window. (Bug#9324) | ||
| 5 | |||
| 1 | 2011-08-25 Eli Zaretskii <eliz@gnu.org> | 6 | 2011-08-25 Eli Zaretskii <eliz@gnu.org> |
| 2 | 7 | ||
| 3 | * xdisp.c (compute_display_string_pos): Return 2 in DISP_PROP when | 8 | * xdisp.c (compute_display_string_pos): Return 2 in DISP_PROP when |
diff --git a/src/xdisp.c b/src/xdisp.c index beb161f4ce4..08e14d71263 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -15099,6 +15099,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 15099 | || (XFASTINT (w->last_modified) >= MODIFF | 15099 | || (XFASTINT (w->last_modified) >= MODIFF |
| 15100 | && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF))) | 15100 | && XFASTINT (w->last_overlay_modified) >= OVERLAY_MODIFF))) |
| 15101 | { | 15101 | { |
| 15102 | int d1, d2, d3, d4, d5, d6; | ||
| 15102 | 15103 | ||
| 15103 | /* If first window line is a continuation line, and window start | 15104 | /* If first window line is a continuation line, and window start |
| 15104 | is inside the modified region, but the first change is before | 15105 | is inside the modified region, but the first change is before |
| @@ -15120,7 +15121,14 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 15120 | compute_window_start_on_continuation_line. (See also | 15121 | compute_window_start_on_continuation_line. (See also |
| 15121 | bug#197). */ | 15122 | bug#197). */ |
| 15122 | && XMARKER (w->start)->buffer == current_buffer | 15123 | && XMARKER (w->start)->buffer == current_buffer |
| 15123 | && compute_window_start_on_continuation_line (w)) | 15124 | && compute_window_start_on_continuation_line (w) |
| 15125 | /* It doesn't make sense to force the window start like we | ||
| 15126 | do at label force_start if it is already known that point | ||
| 15127 | will not be visible in the resulting window, because | ||
| 15128 | doing so will move point from its correct position | ||
| 15129 | instead of scrolling the window to bring point into view. | ||
| 15130 | See bug#9324. */ | ||
| 15131 | && pos_visible_p (w, PT, &d1, &d2, &d3, &d4, &d5, &d6)) | ||
| 15124 | { | 15132 | { |
| 15125 | w->force_start = Qt; | 15133 | w->force_start = Qt; |
| 15126 | SET_TEXT_POS_FROM_MARKER (startp, w->start); | 15134 | SET_TEXT_POS_FROM_MARKER (startp, w->start); |