emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] trivial patch, jumping cursor in term


From: Dan Nicolaescu
Subject: Re: [PATCH] trivial patch, jumping cursor in term
Date: Wed, 23 Sep 2009 18:41:20 -0700 (PDT)

Ivan Kanis <address@hidden> writes:

  > Hello Dan,
  > 
  > Here are the steps to reproduce the bug:
  > 
  > M-x term
  > C-x 2
  > Input a character

I can't reproduce this.
Can you please file a bug, including the patch, with a step description
on how to reproduce this starting from emacs -Q?  (making sure things
like this work correctly is non-trivial, and I might not get to it
soon).

If you can do the same in an "xterm" and point what M-x term does
different than "xterm", that would help a lot. 

  > You'll see the cursor move to the top left when it shouldn't. I have
  > tracked the problem to the following call stack.
  > 
  > term-emulate-terminal
  > term-check-size
  > term-set-scroll-region
  > term-set-scroll-region
  > 
  > The cursor should move when receiving ESC [ R, so I've added a parameter

Why?  

  > to term-set-scroll-region which will move the cursor if set to t.

  > Could you, please, apply the patch?
  > 
  > Kind regards,
  > -- 
  > Ivan
  > Kanis http://kanis.fr
  > 
  > Think like a man of action, act like a man of thought.
  >     -- Henry Bergson 

Please include a changeLog with the patch, to make it easier to
understand.


  > 
  > 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)
                                                         ^^^^^^^^^^^^^
                                                This should be called
                                                move-point or similar.

  >    "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)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]