zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Re: Bug report
Date: Tue, 17 Dec 2013 09:56:21 -0800	[thread overview]
Message-ID: <131217095621.ZM8541@torch.brasslantern.com> (raw)
In-Reply-To: <131217091138.ZM8420@torch.brasslantern.com>

On Dec 17,  9:11am, Bart Schaefer wrote:
}
} This may in fact be another spot in the prompt code that needs to know
} that there is no right-indent.  That might actually fix the issue with
} scrolling up one line, too, on some terminals.

OK, I have tracked this down (and rebuilt my memory) ...

Remember what I said about how some terminals scroll when you write to
the last character, and other don't, and it's not possible to tell
which is which?  This applies to the end of any line, not just to the
lower right corner.  The corner just happens to be the only case where
scrolling actually pushes something off the top.

Src/Zle/zle_refresh.c:moveto() knows that the last character that was
output for the right-prompt was in the rightmost column.  What it does
not know is whether that left the cursor AT the rightmost column, or
whether it wrapped around to the next line.

In order to know what to do next, it has to know where the cursor is.
So it outputs space-backspace, which is guaranteed to make ANY terminal
behave like one of the terminals where the cursor has already wrapped
around to the next line.  Unfortunately this steps on the first character
of whatever was below the prompt.

Now it knows where the cursor is, so it can move up one line to place
the cursor properly within the line containing the prompt.

So to "fix" this (other than by going back to a minimum right-indent of
one), we have to re-implement moveto() in some way that allows it to
"know" where the cursor is after writing to the rightmost column.  There
may not be a way to do this without causing a lot of flickery cursor
motion.


  reply	other threads:[~2013-12-17 17:56 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-17 10:59 Patrick Oscity
2013-12-17 11:27 ` Peter Stephenson
2013-12-17 17:11 ` Bart Schaefer
2013-12-17 17:56   ` Bart Schaefer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-03-01  9:43 BUG REPORT ZheNing Hu
2021-03-01 15:27 ` Daniel Shahaf
2021-03-01 17:32 ` Bart Schaefer
2021-03-05  7:51   ` ZheNing Hu
2019-09-19 11:16 Bug report Vladimir Deyter
2019-09-19 14:53 ` Mikael Magnusson
2019-09-19 15:57   ` Daniel Shahaf
2014-12-26 16:53 mvxxc
2014-12-27  2:35 ` Bart Schaefer
2014-09-17  0:26 bug report Mica Chimera
2014-09-17  1:08 ` Frank Terbeck
2014-06-05 17:05 robin terrep-drangiug
2014-06-05 20:48 ` Bart Schaefer
2013-12-14 18:44 Bug report Patrick Oscity
2013-12-14 19:08 ` Bart Schaefer
2013-12-14 20:43   ` Peter Stephenson
2013-12-15  1:15     ` Bart Schaefer
2013-12-15 13:30       ` Peter Stephenson
2013-12-15 17:10         ` Bart Schaefer
2013-12-15  1:08   ` Patrick Oscity
2013-12-15 11:01   ` Patrick Oscity
2013-08-04 12:16 Bug Report Yuusuke Yoshimoto
2013-08-04 17:58 ` Peter Stephenson
1996-05-22  0:07 Bug report Felix von Leitner
1996-05-15  7:48 Martin Birgmeier
1996-05-10  8:30 Martin Birgmeier
1995-08-24 11:23 Bug Report Carsten Friedrich

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=131217095621.ZM8541@torch.brasslantern.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).