From: Gerd Moellmann Date: Mon, 6 Nov 2000 15:48:27 +0000 (+0000) Subject: (displayed_window_lines): Detect partially X-Git-Tag: emacs-pretest-21.0.90~264 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cdb1fe495d228677248cc4a9a6081458df33d518;p=emacs.git (displayed_window_lines): Detect partially visible lines at the bottom correctly. --- diff --git a/src/ChangeLog b/src/ChangeLog index 728d0f51a8a..e49e7b346ce 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2000-11-06 Gerd Moellmann + + * window.c (displayed_window_lines): Detect partially + visible lines at the bottom correctly. + 2000-11-06 Stefan Monnier * fileio.c (Fwrite_region): Use `visiting' rather than `visit' diff --git a/src/window.c b/src/window.c index 12b15424c28..4a4fecae574 100644 --- a/src/window.c +++ b/src/window.c @@ -4351,7 +4351,8 @@ displayed_window_lines (w) int lines = (rest + CANON_Y_UNIT (f) - 1) / CANON_Y_UNIT (f); it.vpos += lines; } - else if (bottom_y > height) + else if (it.current_y < height && bottom_y > height) + /* Partially visible line at the bottom. */ ++it.vpos; return it.vpos;