projects
/
elisp
/
liece.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6abd66a
)
* liece.el (liece-refresh-buffer-window): Simplified.
author
akr
<akr>
Sat, 9 Dec 2000 07:41:15 +0000
(07:41 +0000)
committer
akr
<akr>
Sat, 9 Dec 2000 07:41:15 +0000
(07:41 +0000)
lisp/ChangeLog
patch
|
blob
|
history
lisp/liece.el
patch
|
blob
|
history
diff --git
a/lisp/ChangeLog
b/lisp/ChangeLog
index
6f7e1bc
..
c283e97
100644
(file)
--- a/
lisp/ChangeLog
+++ b/
lisp/ChangeLog
@@
-1,3
+1,7
@@
+2000-12-09 Tanaka Akira <akr@m17n.org>
+
+ * liece.el (liece-refresh-buffer-window): Simplified.
+
2000-11-30 Tanaka Akira <akr@m17n.org>
* liece.el (liece-refresh-buffer-window): Force to display a last
2000-11-30 Tanaka Akira <akr@m17n.org>
* liece.el (liece-refresh-buffer-window): Force to display a last
diff --git
a/lisp/liece.el
b/lisp/liece.el
index
e0711ef
..
65fedf8
100644
(file)
--- a/
lisp/liece.el
+++ b/
lisp/liece.el
@@
-882,23
+882,16
@@
Only used from `liece-before-insert-functions'."
(defun liece-refresh-buffer-window (buffer)
"Center point in window of BUFFER and redisplay frame."
(defun liece-refresh-buffer-window (buffer)
"Center point in window of BUFFER and redisplay frame."
- (let ((window (liece-get-buffer-window buffer)))
- (when (and window (not (pos-visible-in-window-p (point-max) window)))
+ (let ((window (liece-get-buffer-window buffer))
+ (last-point (point-max)))
+ ;; skip last white spaces
+ (while (memq (char-before last-point) '(?\n ?\t ?\ ))
+ (setq last-point (1- last-point)))
+ (when (and window (not (pos-visible-in-window-p last-point window)))
(save-selected-window
(select-window window)
(save-selected-window
(select-window window)
- (goto-char (point-max))
- (if (null liece-scroll-step)
- (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)))
- (liece-window-height window)))
- (set-window-start window (point))
- (goto-char (point-max)))))))
+ (goto-char last-point)
+ (recenter (- (or liece-scroll-step 1)))))))
(defmacro liece-save-point (&rest body)
"Execute BODY, then goto the point that was around before BODY."
(defmacro liece-save-point (&rest body)
"Execute BODY, then goto the point that was around before BODY."