diff -r b9b27a5565ff lisp/misc/term.el --- a/lisp/misc/term.el Wed Sep 23 15:50:43 2009 +0200 +++ b/lisp/misc/term.el Wed Sep 23 15:52:10 2009 +0200 @@ -3377,10 +3377,11 @@ ((eq char ?r) (term-set-scroll-region (1- term-terminal-previous-parameter) - (1- term-terminal-parameter))) + (1- term-terminal-parameter) + t)) (t))) -(defun term-set-scroll-region (top bottom) +(defun term-set-scroll-region (top bottom &optional esc-bracket-r) "Set scrolling region. TOP is the top-most line (inclusive) of the new scrolling region, while BOTTOM is the line following the new scrolling region (e.g. exclusive). @@ -3398,7 +3399,8 @@ (not (and (= term-scroll-start 0) (= term-scroll-end term-height))))) (term-move-columns (- (term-current-column))) - (term-goto 0 0)) + (if esc-bracket-r + (term-goto 0 0))) ;; (defun term-switch-to-alternate-sub-buffer (set) ;; ;; If asked to switch to (from) the alternate sub-buffer, and already (not)