From cb5f100bd38a3b21739897fb4236db0700b39477 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Sun, 20 Nov 2016 23:54:45 +0100 Subject: 39986, 39989: improve handling of vi-repeat-change Save previous vi change and throw away a new change that fails. Add zle -f vichange to allow shell widget to be a single change. Fix repeat of command where numeric arguments were multiplied. --- Test/X02zlevi.ztst | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Test') diff --git a/Test/X02zlevi.ztst b/Test/X02zlevi.ztst index c19573241..d3b533490 100644 --- a/Test/X02zlevi.ztst +++ b/Test/X02zlevi.ztst @@ -140,6 +140,12 @@ >BUFFER: xxe xxx xxxee >CURSOR: 10 + zletest $'one two three four five six seven eight\e.03d2wk.1.' +0:numeric args to both action and movement are multiplied (and saved for any repeat) +>BUFFER: eight +>seven eight +>CURSOR: 0 + zletest $'yankee doodle\ebhDyy0"1P' 0:paste register 1 to get last deletion >BUFFER: doodleyankee @@ -262,10 +268,8 @@ print -u $ZTST_fd 'This test may hang the shell when it fails...' zletest $'worm\erdhd..' 0:use of vi-repeat as the motion and repeat after a failed change ->BUFFER: word +>BUFFER: wodd >CURSOR: 2 -F:For vi compatibility, "." should repeat the "rd" change after "d." -F:Update result to ">BUFFER: wodd" if compatibility is repaired. zpty_run 'bindkey "^_" undo' zletest $'undoc\037e' -- cgit 1.4.1