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

Re: Bug in ZSH's vi emulation



Bart wrote:
> So, given 39813, this seems to work:

That, along with 39813, looks good. As a further tweak, I had to
make keybuflen not be declared static. It might also be good to
tweak the comment leading up to this function (startvichange) to
reference keybuf instead of lastchar.

> All X02zlevi tests pass, and I'm even able to do e.g. gUfx to uppercase
> everything through the next "x".

Works well in my testing too. We should add a new testcase too such
as that below.

Oliver

diff --git a/Test/X02zlevi.ztst b/Test/X02zlevi.ztst
index ced7030..aa3587e 100644
--- a/Test/X02zlevi.ztst
+++ b/Test/X02zlevi.ztst
@@ -244,6 +244,12 @@
 >BUFFER: binging
 >CURSOR: 3
 
+# for vi compatibility, this should repeat the previous change
+  zletest $'worm\erdhd..'
+0:use of vi-repeat as the motion and repeat after a failed change
+>BUFFER: word
+>CURSOR: 2
+
   zpty_run 'bindkey "^_" undo'
   zletest $'undoc\037e'
 0:use of undo in vi insert mode



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