summaryrefslogtreecommitdiff
path: root/lisp/eshell/em-smart.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2001-04-24 03:16:21 +0000
committerJohn Wiegley <johnw@newartisans.com>2001-04-24 03:16:21 +0000
commit157975e356a04f86bcad1f3503271d10149e7399 (patch)
tree9b49fedd1f30a9857b22973d891620dc96be0a74 /lisp/eshell/em-smart.el
parent3dc630b9e18cac41246c81e2d7d11c25857f4e58 (diff)
downloademacs-157975e356a04f86bcad1f3503271d10149e7399.tar.gz
(eshell-smart-redisplay): Added some safety code to work around a
redisplay problem I've been having.
Diffstat (limited to 'lisp/eshell/em-smart.el')
-rw-r--r--lisp/eshell/em-smart.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/eshell/em-smart.el b/lisp/eshell/em-smart.el
index 9bef8b10d20..0d7810df9e2 100644
--- a/lisp/eshell/em-smart.el
+++ b/lisp/eshell/em-smart.el
@@ -262,7 +262,11 @@ and the end of the buffer are still visible."
(defun eshell-smart-redisplay ()
"Display as much output as possible, smartly."
(if (eobp)
- (recenter -1)
+ (save-excursion
+ (recenter -1)
+ ;; trigger the redisplay now, so that we catch any attempted
+ ;; point motion; this is to cover for a redisplay bug
+ (eshell-redisplay))
(let ((top-point (point)))
(and (memq 'eshell-smart-display-move pre-command-hook)
(>= (point) eshell-last-input-start)