diff options
author | Eli Zaretskii <eliz@gnu.org> | 2014-07-04 16:22:04 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2014-07-04 16:22:04 +0300 |
commit | 5b5953c070455773f3bdfb9ebcc7ecc15dde0611 (patch) | |
tree | c89bd472b9c0058823e7e67af1c7f6bebbe9001b /src/xdisp.c | |
parent | f0f34bc8b91dad77474f8f8c8d9f4bda568eaace (diff) | |
download | emacs-5b5953c070455773f3bdfb9ebcc7ecc15dde0611.tar.gz |
Fix bug #17905 with display of point in partially visible line at end of window.
src/xdisp.c (redisplay_window): If redisplay of a window ends up
with point in a partially visible line at end of the window, make
sure the amended position of point actually has smaller Y
coordinate; if not, give up and scroll the display.
src/window.c (window_scroll_pixel_based): When point ends up at the
last fully visible line, don't let move_it_to stop at the left
edge of the line and dupe us into thinking point is inside the
scroll margin.
Diffstat (limited to 'src/xdisp.c')
-rw-r--r-- | src/xdisp.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 459edf4367f..fe5d0f579d8 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -16106,6 +16106,18 @@ redisplay_window (Lisp_Object window, bool just_this_one_p) /* Point does appear, but on a line partly visible at end of window. Move it back to a fully-visible line. */ new_vpos = window_box_height (w); + /* But if window_box_height suggests a Y coordinate that is + not less than we already have, that line will clearly not + be fully visible, so give up and scroll the display. + This can happen when the default face uses a font whose + dimensions are different from the frame's default + font. */ + if (new_vpos >= w->cursor.y) + { + w->cursor.vpos = -1; + clear_glyph_matrix (w->desired_matrix); + goto try_to_scroll; + } } else if (w->cursor.vpos >= 0) { |