zsh-workers
 help / color / mirror / code / Atom feed
* unicode in prompt breaks command search
@ 2020-01-16 21:43 Nathan Sidwell
  2020-01-17  1:25 ` dana
  0 siblings, 1 reply; 4+ messages in thread
From: Nathan Sidwell @ 2020-01-16 21:43 UTC (permalink / raw)
  To: zsh-workers

For reasons, I put a multibyte unicode char in $PROMPT, this ends up 
messing with zsh's idea of the current column, as it doesn't understand 
the display width of $PROMPT.

For example reverse search, here's an example using <f0><9f><a1><85>

set PROMPT="🡅"

press C-r, see cursor gets indented another 3 spaces -- we're now at 
column 5, which would be correct if each byte of $PROMPT was a separate 
display char.

A slightly modified example is to enter some text before pressing C-r, 
then the first 3 chars get retained on the display (but not the input 
buffer at least).

Is this supposed to work?

This is ZSH 5.2 on a fedora 30 system, and an XFCE terminal.  Let me 
know if you need more info (I'm not on the list).

nathan
-- 
Nathan Sidwell


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

end of thread, other threads:[~2020-01-17 12:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-16 21:43 unicode in prompt breaks command search Nathan Sidwell
2020-01-17  1:25 ` dana
2020-01-17  8:23   ` Roman Perepelitsa
2020-01-17 12:05   ` Nathan Sidwell

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