Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zle: vi mode: wrong undo handling on fresh lines
2014/02/01 07:32, Oliver Kiddle <okiddle@xxxxxxxxxxx> wrote:
> I've attached a patch for this split-undo widget to demonstrate.
I tried this split-undo patch, but if I bind <tab> to
undo-complete-word(), there seems to be at least two problems.
The fist is that AUTO_MENU doesn't work; when there are more than one
candidates (ambiguous), hitting <tab> repeatedly does not insert the
first (and next ...) candidate into the command line.
This may be fixed by the patch at the end of this post.
The second is that the zsh/complist module doesn't work properly.
When the listscroll keymap is in use, complete-word widget is
equivalent to 'scroll forward one screenful', and when the menuselect
keymap is in use it is equivalent to 'moves the mark to the next match'.
But if <tab> is bound to undo-complete-word, it doesn't behave this way
but just accepts the current command line. I don't know how to overcome
this problem.
As for the KEEPSUFFIX flag, the undo works fine with this flag set to
split-undo widget. But I feel keeping the optional suffix like ':' or
',' when going back to the command mode may be sometimes annoying
(yes it can be deleted just by hitting 'x' but I'm so lazy...).
diff --git a/Src/Zle/iwidgets.list b/Src/Zle/iwidgets.list
index a9791ed..7872745 100644
--- a/Src/Zle/iwidgets.list
+++ b/Src/Zle/iwidgets.list
@@ -102,7 +102,7 @@
"self-insert-unmeta", selfinsertunmeta, ZLE_MENUCMP | ZLE_KEEPSUFFIX
"send-break", sendbreak, 0
"set-mark-command", setmarkcommand, ZLE_MENUCMP | ZLE_KEEPSUFFIX | ZLE_LASTCOL
-"split-undo", splitundo, ZLE_KEEPSUFFIX
+"split-undo", splitundo, ZLE_MENUCMP | ZLE_KEEPSUFFIX
"spell-word", spellword, 0
"set-local-history", setlocalhistory, 0
"transpose-chars", transposechars, 0
Messages sorted by:
Reverse Date,
Date,
Thread,
Author