zsh-workers
 help / color / mirror / code / Atom feed
* backward-kill-word & wide characters
@ 2008-09-19  3:33 Phil Pennock
  0 siblings, 0 replies; only message in thread
From: Phil Pennock @ 2008-09-19  3:33 UTC (permalink / raw)
  To: zsh-workers

I have Ctrl-W bound to backward-kill-word, per normal emacs-style
bindings.

If I have a command-line of one of these cases:

case1% cmd <widechar>
case2% cmd <widechar><widechar>
case3% cmd <widechar><ascii>
case4% cmd <ascii><widechar>

where, say, <ascii> is the letter 'a' and <widechar> is CodePoint U+A3
(POUND SIGN), wide in UTF-8, then typing Ctrl-W at the end:

Case 1: deletes entire line, treats space as part of word; skips past
        the space even when there are multiple spaces.
Case 2: ditto
Case 3: deletes <ascii>, stops before deleting widechar
Case 4: behaves "correctly", for my expectation, treating
        <ascii><widechar> as one word and deleting both, leaving the
	cursor after the space

Confirmed with "zsh -f" for a build from today, up to and including the
25690 change (pws's insertlastword fix).

The next two paragraphs note things which have already been confirmed to
not cause the results to vary.

The method of insertion doesn't matter, insert-composed-char or paste,
so widget vs straight input irrelevant.

For some characters, zsh shows in ZLE the codepoint instead of
attempting to render the character; eg, FLOWER PUNCTUATION MARK U+2055 
shows up as '<2055>' and seems to cut&paste cleanly back and forth; I
don't know enough to know if this comes from XTerm or elsewhere.
Regardless, it's deleted as a single character by backward-delete-char
and behaves identically to a rendered wide character as described above.

Okay, enough of the digression started when I went to
  http://www.sevenwires.com/play/UpsideDownLetters.html
and back to work.  ;)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-09-19  3:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-19  3:33 backward-kill-word & wide characters Phil Pennock

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