zsh-workers
 help / color / mirror / code / Atom feed
From: Phil Pennock <zsh-workers+phil.pennock@spodhuis.org>
To: zsh-workers@sunsite.dk
Subject: backward-kill-word & wide characters
Date: Thu, 18 Sep 2008 20:33:01 -0700	[thread overview]
Message-ID: <20080919033300.GA5088@redoubt.spodhuis.org> (raw)

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


                 reply	other threads:[~2008-09-19  3:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080919033300.GA5088@redoubt.spodhuis.org \
    --to=zsh-workers+phil.pennock@spodhuis.org \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).