zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Cc: warepire.ml@gmail.com
Subject: Re: [PATCH 1/1] prompt: Fix an off-by-one in the overf check in countpromt.
Date: Tue, 16 Jan 2018 07:28:38 -0800	[thread overview]
Message-ID: <CAH+w=7ZnLkZ86JOdXKEtjbi6g+PCj8FoyMG6xGnhcJN_2HvpBg@mail.gmail.com> (raw)
In-Reply-To: <20180115103558.1258-2-warepire.ml@gmail.com>

On Mon, Jan 15, 2018 at 2:35 AM,  <warepire.ml@gmail.com> wrote:
> From: Warepire <Warepire@users.noreply.github.com>
>
> This triggers overf when the prompt is exactly as wide as the
> term, causes countprompt to count a 2-line prompt as 3 lines.
> Which transmits an errorneus TCUP to the PTY. In some terminals
> this causes the last line of the previous command to be erased.

I see this has already been pushed to the zsh git, but I'm not sure
it's entirely correct.

This may cause problems on some terminals where auto-margin causes an
additional linefeed when the rightmost (or in some cases only the
bottom rightmost) character position is written.  I would be willing
to bet that the original code was intended to account for this, and
other code has changed around it.

The correct thing may be to make this conditional upon
ZLE_RPROMPT_INDENT, or introduce a similar setting to override the
terminfo assertions of auto-wrap/auto-margin so that the user can
assert whether the additional TCUP is needed.


  reply	other threads:[~2018-01-16 15:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-15 10:35 [PATCH 0/1] " warepire.ml
2018-01-15 10:35 ` [PATCH 1/1] " warepire.ml
2018-01-16 15:28   ` Bart Schaefer [this message]
2018-01-16 17:04     ` Warepire -
2018-01-16 19:32       ` Bart Schaefer
2018-01-16 20:23         ` Warepire -
2018-01-15 11:07 ` [PATCH 0/1] " dana

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=7ZnLkZ86JOdXKEtjbi6g+PCj8FoyMG6xGnhcJN_2HvpBg@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=warepire.ml@gmail.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).