Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

backward-kill-word & wide characters



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



Messages sorted by: Reverse Date, Date, Thread, Author