Ejemplo n.º 1
0
 public static BindResult <T> Run <T>(this BindResult <T> result, params VimKey[] keys)
 {
     foreach (var cur in keys)
     {
         var keyInput = KeyInputUtil.VimKeyToKeyInput(cur);
         Assert.IsTrue(result.IsNeedMoreInput);
         result = result.AsNeedMoreInput().Item.BindFunction.Invoke(keyInput);
     }
     return(result);
 }
Ejemplo n.º 2
0
        public static BindResult <T> Run <T>(this BindResult <T> result, string text)
        {
            for (var i = 0; i < text.Length; i++)
            {
                var keyInput = KeyInputUtil.CharToKeyInput(text[i]);
                Assert.IsTrue(result.IsNeedMoreInput);
                result = result.AsNeedMoreInput().Item.BindFunction.Invoke(keyInput);
            }

            return(result);
        }