zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh workers <zsh-workers@zsh.org>
Subject: Re: unwanted scrolling of the terminal
Date: Thu, 23 Jun 2016 16:30:54 -0700	[thread overview]
Message-ID: <CAH+w=7ax9svOn1bJVfs7ywa9CY2KACqFAZrGWkbh8_kVMBjVoA@mail.gmail.com> (raw)
In-Reply-To: <20160623131959.03fef86b@pwslap01u.europe.root.pri>

On Thu, Jun 23, 2016 at 5:19 AM, Peter Stephenson
<p.stephenson@samsung.com> wrote:
> On Thu, 23 Jun 2016 13:58:51 +0200
> Oliver Kiddle <okiddle@yahoo.co.uk> 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.


      reply	other threads:[~2016-06-23 23:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-23 11:58 Oliver Kiddle
2016-06-23 12:19 ` Peter Stephenson
2016-06-23 23:30   ` Bart Schaefer [this message]

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='CAH+w=7ax9svOn1bJVfs7ywa9CY2KACqFAZrGWkbh8_kVMBjVoA@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /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 public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).