[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] trivial patch, jumping cursor in term
From: |
Stefan Monnier |
Subject: |
Re: [PATCH] trivial patch, jumping cursor in term |
Date: |
Fri, 25 Sep 2009 10:29:54 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
>> Hmm... it should have *exactly* the same effect as your patch.
> Does it work for you? It didn't seem to work for me...
It worked as well (or as poorly, depending on the test) as yours (if
you look at the code, you'll see my patch really does exactly the same
thing as yours, tho slightly differently).
I tested the patch below, and it doesn't seem to fix the bug at all
in my case (using: M-x term RET RET C-c C-j C-x 2 RET). :-(
Stefan
--- term.el.~1.122.~ 2009-09-24 22:47:06.000000000 -0400
+++ term.el 2009-09-25 10:25:33.000000000 -0400
@@ -3369,10 +3369,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).
@@ -3390,7 +3391,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)
@@ -3721,7 +3723,7 @@
(let ((start-column (term-horizontal-column)))
(when (and check-for-scroll (or term-scroll-with-delete term-pager-count))
(setq down (term-handle-scroll down)))
- (unless (and (= term-current-row 0) (< down 0))
+ (unless (and term-current-row (= term-current-row 0) (< down 0))
(term-adjust-current-row-cache down)
(when (or (/= (point) (point-max)) (< down 0))
(setq down (- down (term-vertical-motion down)))))
- [PATCH] trivial patch, jumping cursor in term, Ivan Kanis, 2009/09/23
- Re: [PATCH] trivial patch, jumping cursor in term, Dan Nicolaescu, 2009/09/23
- Re: [PATCH] trivial patch, jumping cursor in term, Stefan Monnier, 2009/09/23
- Re: [PATCH] trivial patch, jumping cursor in term, Ivan Kanis, 2009/09/24
- Re: [PATCH] trivial patch, jumping cursor in term, Stefan Monnier, 2009/09/24
- Re: [PATCH] trivial patch, jumping cursor in term, Dan Nicolaescu, 2009/09/24
- Re: [PATCH] trivial patch, jumping cursor in term, Ivan Kanis, 2009/09/25
- Re: [PATCH] trivial patch, jumping cursor in term,
Stefan Monnier <=
- Re: [PATCH] trivial patch, jumping cursor in term, Ivan Kanis, 2009/09/28