Zsh Mailing List Archive
Messages sorted by:
Re: [PATCH 1/1] prompt: Fix an off-by-one in the overf check in countpromt.
- X-seq: zsh-workers 42288
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- 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
- Cc: warepire.ml@xxxxxxxxx
- 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 :cc; bh=lh8ufQUU9seSw+ZkEx4fXif1b86ZUEhKbGNE/oukFxk=; b=fSqI9i3PK7oFGTP/q3WyHuMYeSg4pCvJDgQxMpfuZajEr9Fpu0lr7X+3/sUUASW1W/ 1mFcDB8MLj2K9XDmUEqdyNOHC33Gy1WpfssVXLUCv4mzAMttWEl9dweAISVOrI68arUH ojHrkw+V289SuT8WEZ0XbPS47Km9KXt4wcM8JfKrCLX1baYHCS8mmF+NCLn7dlgW+jjt W3C88Pc10BFLFqY65G309AJWsXOw+je1mESaqMDdZz2/6R6tmFXjaJplyf+9Jpv0ld9q FRsZPQhIvzQw+NoaCC6nLD9Ad4wyD6LnrdP39nPi40ddK/RbeAp831qQnn+6Zc1rmmh5 6Pnw==
- In-reply-to: <email@example.com>
- List-help: <mailto:firstname.lastname@example.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:email@example.com>
- List-unsubscribe: <mailto:firstname.lastname@example.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <email@example.com> <firstname.lastname@example.org>
On Mon, Jan 15, 2018 at 2:35 AM, <warepire.ml@xxxxxxxxx> wrote:
> From: Warepire <Warepire@xxxxxxxxxxxxxxxxxxxxxxxx>
> 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.
Messages sorted by: