diff options
| author | Stefan Monnier | 2009-09-24 02:15:11 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2009-09-24 02:15:11 +0000 |
| commit | 8ad2defcbb0ee596a926ebb77cbe2146574292d2 (patch) | |
| tree | 06281f0c5072b6382bc826725cf491e6f096eac5 | |
| parent | 4a814992b8972f549477673c4470d7307d0adefe (diff) | |
| download | emacs-8ad2defcbb0ee596a926ebb77cbe2146574292d2.tar.gz emacs-8ad2defcbb0ee596a926ebb77cbe2146574292d2.zip | |
* term.el (term-set-scroll-region): Don't move cursor any more.
(term-handle-ansi-escape): Call term-goto here instead.
Suggested by Ivan Kanis <apple@kanis.eu>.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/term.el | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 02a8589512e..e216b9e1c7f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2009-09-24 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2009-09-24 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * term.el (term-set-scroll-region): Don't move cursor any more. | ||
| 4 | (term-handle-ansi-escape): Call term-goto here instead. | ||
| 5 | Suggested by Ivan Kanis <apple@kanis.eu>. | ||
| 6 | |||
| 3 | * term.el: Require CL. | 7 | * term.el: Require CL. |
| 4 | (term-ansi-reset): New function. | 8 | (term-ansi-reset): New function. |
| 5 | (term-mode, term-emulate-terminal, term-handle-colors-array): Use it. | 9 | (term-mode, term-emulate-terminal, term-handle-colors-array): Use it. |
diff --git a/lisp/term.el b/lisp/term.el index b7eb9fd1845..2d52bdc0f1c 100644 --- a/lisp/term.el +++ b/lisp/term.el | |||
| @@ -3369,7 +3369,8 @@ Set it to nil to disable bold.") | |||
| 3369 | ((eq char ?r) | 3369 | ((eq char ?r) |
| 3370 | (term-set-scroll-region | 3370 | (term-set-scroll-region |
| 3371 | (1- term-terminal-previous-parameter) | 3371 | (1- term-terminal-previous-parameter) |
| 3372 | (1- term-terminal-parameter))) | 3372 | (1- term-terminal-parameter)) |
| 3373 | (term-goto 0 0)) | ||
| 3373 | (t))) | 3374 | (t))) |
| 3374 | 3375 | ||
| 3375 | (defun term-set-scroll-region (top bottom) | 3376 | (defun term-set-scroll-region (top bottom) |
| @@ -3389,8 +3390,7 @@ The top-most line is line 0." | |||
| 3389 | (or (term-using-alternate-sub-buffer) | 3390 | (or (term-using-alternate-sub-buffer) |
| 3390 | (not (and (= term-scroll-start 0) | 3391 | (not (and (= term-scroll-start 0) |
| 3391 | (= term-scroll-end term-height))))) | 3392 | (= term-scroll-end term-height))))) |
| 3392 | (term-move-columns (- (term-current-column))) | 3393 | (term-move-columns (- (term-current-column)))) |
| 3393 | (term-goto 0 0)) | ||
| 3394 | 3394 | ||
| 3395 | ;; (defun term-switch-to-alternate-sub-buffer (set) | 3395 | ;; (defun term-switch-to-alternate-sub-buffer (set) |
| 3396 | ;; ;; If asked to switch to (from) the alternate sub-buffer, and already (not) | 3396 | ;; ;; If asked to switch to (from) the alternate sub-buffer, and already (not) |