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

vi-backward-kill-word



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


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