From: "Jun T." <takimoto-j@kba.biglobe.ne.jp>
To: zsh-workers@sunsite.dk
Subject: vi-backward-kill-word
Date: Tue, 22 Apr 2008 01:10:40 +0900 [thread overview]
Message-ID: <A2142905-01C6-4D18-9CE2-EC23B8DE2F03@kba.biglobe.ne.jp> (raw)
Since you wrote in your first post:
>Known gaps at the moment:
>- Word tests need improving (a whole smattering HEREs)
>- Vi "r" needs some work (another HERE)
I guess you already know that vi "r" and "R" do not work properly
on combined character(s).
Another minor problem is, when in vi-insert mode, ^W
(vi-backward-kill-word) kills wrong part of the line if the word
to be killed contains combined character.
zsh -f
bindkey -v
echo é<^W>
echó
(Here é is in decomposed form: e + U+0301).
The word "é" must be killed, but what is actually killed is " e"
(a space and "e"), leaving the combining character.
It *seems* it can be fixed by replacing the line 44 of zle_word.c
backkill(zlecs - x, CUT_FRONT);
by
backkill(zlecs - x, CUT_FRONT|CUT_RAW);
In the present case, the comgining character(s) are already taken
accout of by vibackwardkillword(), and 'zlecs - x' is the number
of wchar_t to be killed. So I *guess* CUT_RAW should be used here.
Am I right?
# I guess you are busy working on many problems.
# I fear I'm disturbing you...
next reply other threads:[~2008-04-21 16:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-21 16:10 Jun T. [this message]
2008-04-21 17:27 ` vi-backward-kill-word Peter Stephenson
2008-04-21 17:57 ` vi-backward-kill-word Peter Stephenson
2008-04-22 17:56 ` vi-backward-kill-word Jun T.
2008-04-23 8:32 ` vi-backward-kill-word Peter Stephenson
2008-04-24 10:35 vi-backward-kill-word Jun T.
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=A2142905-01C6-4D18-9CE2-EC23B8DE2F03@kba.biglobe.ne.jp \
--to=takimoto-j@kba.biglobe.ne.jp \
--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).