From 6abd66a08b3ffeaf7492b5611aa57751979b7573 Mon Sep 17 00:00:00 2001 From: akr Date: Thu, 30 Nov 2000 06:16:37 +0000 Subject: [PATCH] * liece.el (liece-refresh-buffer-window): Force to display a last non-empty line in last line in a window on Emacs 21. --- lisp/ChangeLog | 5 +++++ lisp/liece.el | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 68ab7be..6f7e1bc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2000-11-30 Tanaka Akira + + * liece.el (liece-refresh-buffer-window): Force to display a last + non-empty line in last line in a window on Emacs 21. + 2000-10-19 Daiki Ueno * liece-ctcp.el: Remove autoload cookies of diff --git a/lisp/liece.el b/lisp/liece.el index 97c3b23..e0711ef 100644 --- a/lisp/liece.el +++ b/lisp/liece.el @@ -888,7 +888,11 @@ Only used from `liece-before-insert-functions'." (select-window window) (goto-char (point-max)) (if (null liece-scroll-step) - (recenter (- (liece-window-height window) 1)) + (progn + ;; skip last empty lines + (while (memq (char-before) '(?\n ?\t ?\ )) + (backward-char)) + (recenter -1)) (vertical-motion (- (or liece-scroll-step (1+ (/ (liece-window-height window) 2))) -- 1.7.10.4