* liece.el (liece-refresh-buffer-window): Force to display a last
authorakr <akr>
Thu, 30 Nov 2000 06:16:37 +0000 (06:16 +0000)
committerakr <akr>
Thu, 30 Nov 2000 06:16:37 +0000 (06:16 +0000)
non-empty line in last line in a window on Emacs 21.

lisp/ChangeLog
lisp/liece.el

index 68ab7be..6f7e1bc 100644 (file)
@@ -1,3 +1,8 @@
+2000-11-30   Tanaka Akira  <akr@m17n.org>
+
+       * 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  <ueno@unixuser.org>
 
        * liece-ctcp.el: Remove autoload cookies of
 2000-10-19   Daiki Ueno  <ueno@unixuser.org>
 
        * liece-ctcp.el: Remove autoload cookies of
index 97c3b23..e0711ef 100644 (file)
@@ -888,7 +888,11 @@ Only used from `liece-before-insert-functions'."
        (select-window window)
        (goto-char (point-max))
        (if (null liece-scroll-step)
        (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)))
          (vertical-motion
           (- (or liece-scroll-step
                  (1+ (/ (liece-window-height window) 2)))