diff options
| author | Eli Zaretskii | 2011-08-23 13:35:47 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2011-08-23 13:35:47 +0300 |
| commit | 8ddde6516c5bd15ea8af79800779a28c8742c488 (patch) | |
| tree | f13e9c484410ede94fdce33878ed45520657adbb /src | |
| parent | 3bbf23bc315e8cf47c459148dad86adeb3e38242 (diff) | |
| download | emacs-8ddde6516c5bd15ea8af79800779a28c8742c488.tar.gz emacs-8ddde6516c5bd15ea8af79800779a28c8742c488.zip | |
Fix bug #8874 with recentering and header line under scroll-conservatively.
src/xdisp.c (redisplay_window): When computing centering_position,
account for the height of the header line.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/xdisp.c | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index d4f654a1028..1b1a8f67e43 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2011-08-23 Eli Zaretskii <eliz@gnu.org> | 1 | 2011-08-23 Eli Zaretskii <eliz@gnu.org> |
| 2 | 2 | ||
| 3 | * xdisp.c (redisplay_window): When computing centering_position, | ||
| 4 | account for the height of the header line. (Bug#8874) | ||
| 5 | |||
| 3 | * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos | 6 | * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos |
| 4 | instead of CHAR_TO_BYTE. Fixes a crash when a completion | 7 | instead of CHAR_TO_BYTE. Fixes a crash when a completion |
| 5 | candidate is selected by the mouse, and that candidate has a | 8 | candidate is selected by the mouse, and that candidate has a |
diff --git a/src/xdisp.c b/src/xdisp.c index 9b2b0da4317..6a11628f858 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -15244,7 +15244,8 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 15244 | if (pt_offset) | 15244 | if (pt_offset) |
| 15245 | centering_position -= pt_offset; | 15245 | centering_position -= pt_offset; |
| 15246 | centering_position -= | 15246 | centering_position -= |
| 15247 | FRAME_LINE_HEIGHT (f) * (1 + margin + (last_line_misfit != 0)); | 15247 | FRAME_LINE_HEIGHT (f) * (1 + margin + (last_line_misfit != 0)) |
| 15248 | + WINDOW_HEADER_LINE_HEIGHT (w); | ||
| 15248 | /* Don't let point enter the scroll margin near top of | 15249 | /* Don't let point enter the scroll margin near top of |
| 15249 | the window. */ | 15250 | the window. */ |
| 15250 | if (centering_position < margin * FRAME_LINE_HEIGHT (f)) | 15251 | if (centering_position < margin * FRAME_LINE_HEIGHT (f)) |