all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Ivan Kanis <expire-by-2009-09-28@kanis.fr>
Cc: dann@ics.uci.edu, emacs-devel@gnu.org
Subject: Re: [PATCH] trivial patch, jumping cursor in term
Date: Wed, 23 Sep 2009 22:15:22 -0400	[thread overview]
Message-ID: <jwvk4zprt29.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <86d45hhia4.fsf@kanis.fr> (Ivan Kanis's message of "Wed, 23 Sep 2009 16:01:23 +0200")

>>>>> "Ivan" == Ivan Kanis <expire-by-2009-09-28@kanis.fr> writes:

> Hello Dan,

> Here are the steps to reproduce the bug:

> M-x term
> C-x 2
> Input a character

The C-x 2 doesn't do anything here, so I don't know how to reproduce
your problem.

> 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
> to term-set-scroll-region which will move the cursor if set to t.

> Could you, please, apply the patch?

I've installed the patch below instead.  Can you confirm it works as well?


        Stefan


--- term.el.~1.120.~	2009-09-23 22:02:59.000000000 -0400
+++ term.el	2009-09-23 22:09:37.000000000 -0400
@@ -3369,7 +3369,8 @@
    ((eq char ?r)
     (term-set-scroll-region
      (1- term-terminal-previous-parameter)
-     (1- term-terminal-parameter)))
+     (1- term-terminal-parameter))
+    (term-goto 0 0))
    (t)))
 
 (defun term-set-scroll-region (top bottom)
@@ -3389,8 +3390,7 @@
 	(or (term-using-alternate-sub-buffer)
 	    (not (and (= term-scroll-start 0)
 		      (= term-scroll-end term-height)))))
-  (term-move-columns (- (term-current-column)))
-  (term-goto 0 0))
+  (term-move-columns (- (term-current-column))))
 
 ;; (defun term-switch-to-alternate-sub-buffer (set)
 ;;   ;; If asked to switch to (from) the alternate sub-buffer, and already (not)




  parent reply	other threads:[~2009-09-24  2:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-23 14:01 [PATCH] trivial patch, jumping cursor in term Ivan Kanis
2009-09-24  1:41 ` Dan Nicolaescu
2009-09-24  2:15 ` Stefan Monnier [this message]
2009-09-24  6:46   ` Ivan Kanis
2009-09-24 15:02     ` Stefan Monnier
2009-09-24 17:11       ` Dan Nicolaescu
2009-09-25  8:56         ` Ivan Kanis
2009-09-25 14:29           ` Stefan Monnier
2009-09-28  6:30             ` Ivan Kanis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvk4zprt29.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=dann@ics.uci.edu \
    --cc=emacs-devel@gnu.org \
    --cc=expire-by-2009-09-28@kanis.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.