zsh-workers
 help / color / mirror / code / Atom feed
From: "Alexandros Kozak" <agkozak@gmail.com>
To: <zsh-workers@zsh.org>
Subject: Prompt wrapping problems since 42285 ("off by one fix in multiple prompts ")
Date: Thu, 10 May 2018 15:27:44 -0700	[thread overview]
Message-ID: <005701d3e8ae$1eab9070$5c02b150$@gmail.com> (raw)

I have an asynchronous ZSH prompt
(https://github.com/agkozak/agkozak-zsh-theme) that works quite well in ZSH
4.3.11-5.4.2. Ever since v5.5 came out, I've been having a lot of trouble
when the prompt wraps; the cursor frequently appears a few characters back
from where it should. Eliminating the RPROMPT sometimes helps a bit, but
even then, if I enter something and then delete the line, the cursor will
snap back on top of the text of the left prompt, not at its end.

A simple test demonstration can be had (without downloading my prompt) by
loading v5.5 or v5.5.1 with zsh -f and then entering

    PROMPT='abc@def
~/abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz %# '

Make the terminal window narrow or the type very large so that the prompt
wraps. Enter a command that wraps to the next line, then delete the command
(in vi mode, ESC d d). Depending on the width of the terminal window, the
cursor may land one or more places before it should.

If you throw in an RPROMPT, such as

    RPROMPT='(foo bar bat)'

some real ugliness can be had -- always depending, of course, on the width
of the screen. I've tested this out in Ubuntu and FreeBSD with mintty,
PuTTY, lxterminal, and Blink Shell.

Reverting the change in

	
https://github.com/zsh-users/zsh/commit/d8d9fee137a5aa2cf9bf8314b06895bfc2a0
5518

fixes the problems I've described.

Any suggestions? Many thanks in advance/


Alexandros Kozak



             reply	other threads:[~2018-05-10 22:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20180510222848epcas1p217b8864e4a44eaba7f15d4a48f1836a7@epcas1p2.samsung.com>
2018-05-10 22:27 ` Alexandros Kozak [this message]
2018-05-14  8:51   ` Peter Stephenson

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='005701d3e8ae$1eab9070$5c02b150$@gmail.com' \
    --to=agkozak@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).