zsh-workers
 help / color / mirror / code / Atom feed
* zle - poor terminal echo on input line shortening
@ 2019-04-07 23:46 Per Bothner
  2019-04-08 15:09 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Per Bothner @ 2019-04-07 23:46 UTC (permalink / raw)
  To: zsh-workers

[I am not on the zsh-workers list, so please cc me on any responses.]

Consider typing an input line like 'echo foobar' and then deleting the last 3
characters (by backspacing).  That logically and visually yields "echo foo".
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.  Some terminals keep track of the
maximum number of characters written to a line so they can distinguish explicit
space from "non-written" padding.

Both bash/readline and fish get this right because they instead send "\b\e[K".

This also show up in different colors/styling on the DomTerm terminal emulator
(https://domterm.org) because it sets a special css style for the actual input line.

Of course this is a very minor issue ...
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-08 15:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-07 23:46 zle - poor terminal echo on input line shortening Per Bothner
2019-04-08 15:09 ` Bart Schaefer

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).