comparison lisp/term.el @ 105173:500233eb2d72

* 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>.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 24 Sep 2009 02:15:11 +0000
parents 69e85f510ced
children e7e9efa5ce16
comparison
equal deleted inserted replaced
105172:69e85f510ced 105173:500233eb2d72
3367 (1+ (term-horizontal-column))))) 3367 (1+ (term-horizontal-column)))))
3368 ;; \E[r - Set scrolling region (terminfo: csr) 3368 ;; \E[r - Set scrolling region (terminfo: csr)
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)
3376 "Set scrolling region. 3377 "Set scrolling region.
3377 TOP is the top-most line (inclusive) of the new scrolling region, 3378 TOP is the top-most line (inclusive) of the new scrolling region,
3387 bottom)) 3388 bottom))
3388 (setq term-scroll-with-delete 3389 (setq term-scroll-with-delete
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)
3397 ;; ;; using it, do nothing. This test is needed for some programs (including 3397 ;; ;; using it, do nothing. This test is needed for some programs (including
3398 ;; ;; Emacs) that emit the ti termcap string twice, for unknown reason. 3398 ;; ;; Emacs) that emit the ti termcap string twice, for unknown reason.