all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: Aaron Jensen <aaronjensen@gmail.com>
Cc: 30544@debbugs.gnu.org
Subject: bug#30544: 26.0.91; ansi-term duplicates 2 line zsh prompts any time windows change (maybe other times)
Date: Sun, 01 Apr 2018 22:39:26 -0400	[thread overview]
Message-ID: <878ta6pc0x.fsf@gmail.com> (raw)
In-Reply-To: <87in9yw73t.fsf@gmail.com> (Noam Postavsky's message of "Wed, 14 Mar 2018 19:49:26 -0400")

Noam Postavsky <npostavs@gmail.com> writes:

> Odd.  I have urxvt here, and it seems to be able to resize both width
> and height without getting any duplicated prompts.  Could it be that zsh
> always repaints the prompt on a resize, but term.el (and iTerm for width
> adjustments) don't put point where zsh is expecting after a resize?

Okay, I edebugged term-emulate-terminal, zsh is sending the correct
escape sequences, the problem is that `term-current-row' is set to 0,
which causes \e[A to be a nop instead of moving the cursor up one row as
it should.

M-x debug-watch RET term-current-row RET reveals that the
term-set-scroll-region call sets term-current-row to 0.  This is
correct, because it does also move point to row 0.  However, after the
call is finished, term-reset-size does (goto-char point) to restore the
original point, but it doesn't reset the cached row accordingly.

So the following fixes it (possibly we should be resetting the current
column as well?).

--- i/lisp/term.el
+++ w/lisp/term.el
@@ -1167,4 +1167,5 @@ term-reset-size
       (setq term-current-column nil)
       (term-set-scroll-region 0 height)
+      (setq term-current-row nil)
       (goto-char point))))





  parent reply	other threads:[~2018-04-02  2:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-20  2:07 bug#30544: 26.0.91; ansi-term duplicates 2 line zsh prompts any time windows change (maybe other times) Aaron Jensen
2018-02-20 20:25 ` Glenn Morris
2018-03-14 15:59 ` Aaron Jensen
2018-03-14 17:34   ` Eli Zaretskii
2018-03-14 18:08     ` Aaron Jensen
2018-03-14 18:30       ` Eli Zaretskii
2018-03-14 20:25         ` Aaron Jensen
2018-03-14 23:49           ` Noam Postavsky
2018-03-15  0:54             ` Aaron Jensen
2018-03-15  1:06               ` Noam Postavsky
2018-03-15  1:33                 ` Aaron Jensen
2018-03-15  1:42                   ` Noam Postavsky
2018-03-15  2:41                     ` Aaron Jensen
2018-04-02  2:39             ` Noam Postavsky [this message]
2018-04-02  5:46               ` Eli Zaretskii
2018-04-02 11:04                 ` Noam Postavsky
2018-04-02 19:17                   ` Aaron Jensen
2018-03-14 18:33       ` Glenn Morris

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=878ta6pc0x.fsf@gmail.com \
    --to=npostavs@gmail.com \
    --cc=30544@debbugs.gnu.org \
    --cc=aaronjensen@gmail.com \
    /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.