Subject: Re: bug#30544: 26.0.91; ansi-term duplicates 2 line zsh prompts any time windows change (maybe other times)

From: Aaron Jensen <[email-masked]>
Date: Wed, 14 Mar 2018 13:25:16 -0700

On Wed, Mar 14, 2018 at 11:30 AM, Eli Zaretskii <[email-masked]> wrote:
> I think the problem in term.el is because we send the TIOCSWINSZ ioctl
> when we shouldn't, see window-adjust-process-window-size-function and
> set-process-window-size.  We had similar issues in the past, see
> bug#24465.

Hmm, this is tricky. For my case, I'd only want to send TIOCSWINSZ if
the width changes. However, if someone ran a full screen application
in a term, they'd want it to send that if the height or width changed
I imagine.

I guess my wondering is what is different about term.el vs iTerm.
iTerm has similar artifacts in zsh if the width is adjusted, but not
when the height is adjusted.

AFAICT the only things they do different are they rate limit the
setting and they prevent setting it if the size is already as it
should be.

https://github.com/gnachman/iTerm2/blob/f8a5930b5c47fa6420f423fcb33320029abdcd5b/sources/PTYTask.m#L873