Zsh Mailing List Archive
Messages sorted by:
Re: unwanted scrolling of the terminal
- X-seq: zsh-workers 38758
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: unwanted scrolling of the terminal
- Date: Thu, 23 Jun 2016 16:30:54 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=1zRFnj/7ut3PZkmUIYoPfqn4Zklykiji/16hh5uygsk=; b=PX4ILRodABDEN5Mm5NSHCYql/PTyAoXYt/Yq6P6AGi4Ar/k8lGTMx657Xd8xgLTUS7 9WWBxGtG9x13Z0VXfoO3nJ92lYLqbiJZ6EC9EWUEmC1qUyZUVU8RCWyt/aFfbtgfNLiZ Eg3sK26f+iM/hSso11y4fQ4LktEvZR5PcBz3T5VjsEcDYeI6uOrYcAUdWegffa+I9vL+ JL4iGHxDKNd7Yt6SJ0Sy3DBvcMwWCjVS/6HLiWd2RI7uq5rfmRzsizsoYqXocv5xwhX4 QjgVnneUwOvd1i2CrapNAXmbO1aUp8y1KgX/b8+4wD4SNuEda17/wdp0YI/wrc9do2Ku 4uSg==
- In-reply-to: <firstname.lastname@example.org>
- List-help: <mailto:email@example.com>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:firstname.lastname@example.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <email@example.com> <firstname.lastname@example.org>
On Thu, Jun 23, 2016 at 5:19 AM, Peter Stephenson
> On Thu, 23 Jun 2016 13:58:51 +0200
> Oliver Kiddle <okiddle@xxxxxxxxxxx> wrote:
>> So why the two spaces? The second of those is what caused the scrolling.
> It appears to be specific to terminals with automatic margins (hasam).
Yes, that would be it.
> I *think* that code is supposed to have the effect of ensuring if we
> subsequently [move] the cursor right without printing then it knows that
> the new line is actually a logical continuation of the previous one ---
> hence the subsequent carriage return to get back from there.
I think it's actually trying to make sure there's room to print the
buffer without having the terminal scroll during printing; ZLE has to
make sure that the location corresponding to CURSOR=0 won't change
while the buffer is being output, and the easiest way to do that is to
force any change that might happen to happen first. But I'm surmising
from insufficient knowledge, same as you.
It's also possible that this is a vi-mode-specific problem though it
doesn't sound like it from Oliver's description of code walk-through.
The only person who might remember how all this came together is Wayne.
> This code is all originally 1990s --- I have no idea if modern terminals
> even respond to these tricks. I think automatic margin problems were
> much more trendy twenty years ago.
Certainly there were more terminals that handled it wrong back then,
but it wasn't that long ago that we had to introduce
ZLE_RPROMPT_INDENT to address a related issue.
Messages sorted by: