From cdb1fe495d228677248cc4a9a6081458df33d518 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Mon, 6 Nov 2000 15:48:27 +0000 Subject: [PATCH] (displayed_window_lines): Detect partially visible lines at the bottom correctly. --- src/ChangeLog | 5 +++++ src/window.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) 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; -- 2.39.5