[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 2765945: Fix eshell/clear not working if the output
From: |
Vibhav Pant |
Subject: |
[Emacs-diffs] master 2765945: Fix eshell/clear not working if the output has a small line count |
Date: |
Wed, 28 Oct 2015 21:41:17 +0000 |
branch: master
commit 2765945d616f9661dd0aa641f4ecd328dd8768d7
Author: Vibhav Pant <address@hidden>
Commit: Vibhav Pant <address@hidden>
Fix eshell/clear not working if the output has a small line count
* lisp/eshell/esh-mode.el: (eshell/clear): Use (window-size) as the
number of newlines to be inserted. This fixes the issue where
eshell/clear wouldn't work if the prompt was not at the bottom of the
window, and the output wasn't too long.
---
lisp/eshell/esh-mode.el | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el
index 3df820d..9cc9d34 100644
--- a/lisp/eshell/esh-mode.el
+++ b/lisp/eshell/esh-mode.el
@@ -877,9 +877,8 @@ If SCROLLBACK is non-nil, clear the scrollback contents."
(interactive)
(if scrollback
(eshell/clear-scrollback)
- (let ((number-newlines (count-lines (window-start) (point))))
- (insert (make-string number-newlines ?\n))
- (eshell-send-input))))
+ (insert (make-string (window-size) ?\n))
+ (eshell-send-input)))
(defun eshell/clear-scrollback ()
"Clear the scrollback content of the eshell window."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 2765945: Fix eshell/clear not working if the output has a small line count,
Vibhav Pant <=