Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
backward-kill-word & wide characters
- X-seq: zsh-workers 25692
- From: Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: backward-kill-word & wide characters
- Date: Thu, 18 Sep 2008 20:33:01 -0700
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=d200807; d=spodhuis.org; h=Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:MIME-Version:Content-Type:Content-Disposition; b=NLSQiO6ATgSCsoZpgquw9fgyBpBMlKFZ/aDl2IkdbpJpppFD2X0JEkufDkd5NrerdcgXLxEhE8Dnn+BRSw0/i+kR1PazF7g/kumnsAjKrfm432s9GU6+qeD7w0wRTi1uhSRYgsI1WzkuiZtHI8mbxhZUc/LLRNHKxtxb1d1tVmM=;
- Mail-followup-to: zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
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