Zsh Mailing List Archive
Messages sorted by:
Re: zle - poor terminal echo on input line shortening
- X-seq: zsh-workers 44212
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: Re: zle - poor terminal echo on input line shortening
- Date: Mon, 8 Apr 2019 08:09:25 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=dnBk+wvGOezeml0Dxu+d3uvESOl6R7aZiS7MTyHfrbA=; b=nB5WChvIEFEcPriJk2BFDrmM9Xo6be2m7U8XZpRvBDtgp4ycU0IqZ5H29gyB2UUIk8 2szsZMPS4f9M8g3aW0o7Oo9CRBAhnvdwleCw/zqHM3p1+rFvGQ1wsPtF5FxIjfnk7H6y fP8jERIfhoVXqX7Gm76pjwMYr6NE3O9hcuYyPl4EUnsXaR1hzDIMbE6w7Nk6mF2F+Ew9 I5bCfd1QMR5VxWTIAo7D8KEAApx4DXM/MQ7qdNXqGeNa1nm2KoqOWsQhiFbt70fuS/3/ 48s/Ot+S1ID/YKFQsZY/Q+AFwjNhT/tP750fhZHzMb+QOUhLk2PztDesFbCW6KcoiwQo IntA==
- 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>
On Sun, Apr 7, 2019 at 4:47 PM Per Bothner <per@xxxxxxxxxxx> wrote:
> However, if you copy the line from some terminals (e.g. gnome-terminal), and paste
> (into say emacs) you get "echo foo " with extra spaces. That is because zle
> sends "\b \b" in response to the backspace.
ZLE is in most cases sending what the terminfo (termcap, curses)
library says will update the screen in the least number of transmitted
bytes. In fact I don't think ZLE even explicitly defines that
sequence anywhere; if you delete 3 characters in the middle of a line
it'll still draw spaces on top of 3 characters at the end when
"repainting" everything to the right of the deletion.
> Both bash/readline and fish get this right because they instead send "\b\e[K".
Readline/fish don't have the $RPOMPT that (if present) would be erased
by "\e[K", among other things.
Messages sorted by: