GNU bug report logs -
#30544
26.0.91; ansi-term duplicates 2 line zsh prompts any time windows change (maybe other times)
Previous Next
Reported by: Aaron Jensen <aaronjensen <at> gmail.com>
Date: Tue, 20 Feb 2018 02:09:01 UTC
Severity: minor
Tags: confirmed, fixed
Found in versions 26.0.91, 25.1
Fixed in version 26.1
Done: Noam Postavsky <npostavs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #53 received at 30544 <at> debbugs.gnu.org (full text, mbox):
Noam Postavsky <npostavs <at> 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))))
This bug report was last modified 7 years and 48 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.