+ if (member (c, vi_motion))
+ {
+#if defined (READLINE_CALLBACKS)
+ /* If we just read a vi-mode motion command numeric argument, turn off
+ the `reading numeric arg' state */
+ if (RL_ISSTATE (RL_STATE_CALLBACK) && RL_VIMOVENUMARG())
+ RL_UNSETSTATE (RL_STATE_NUMERICARG);
+#endif
+ /* Should do everything, including turning off RL_STATE_VIMOTION */
+ return (rl_domove_motion_callback (m));
+ }
+ else if (m->key == c && (m->key == 'd' || m->key == 'y' || m->key == 'c'))
+ {
+ rl_mark = rl_end;
+ rl_beg_of_line (1, c);
+ _rl_vi_last_motion = c;
+ RL_UNSETSTATE (RL_STATE_VIMOTION);
+ return (vidomove_dispatch (m));
+ }
+#if defined (READLINE_CALLBACKS)
+ /* XXX - these need to handle rl_universal_argument bindings */
+ /* Reading vi motion char continuing numeric argument */
+ else if (_rl_digit_p (c) && RL_ISSTATE (RL_STATE_CALLBACK) && RL_VIMOVENUMARG())
+ {
+ return (_rl_vi_arg_dispatch (c));
+ }
+ /* Readine vi motion char starting numeric argument */
+ else if (_rl_digit_p (c) && RL_ISSTATE (RL_STATE_CALLBACK) && RL_ISSTATE (RL_STATE_VIMOTION) && (RL_ISSTATE (RL_STATE_NUMERICARG) == 0))
+ {
+ RL_SETSTATE (RL_STATE_NUMERICARG);
+ return (_rl_vi_arg_dispatch (c));
+ }
+#endif
+ else if (_rl_digit_p (c))
+ {
+ /* This code path taken when not in callback mode */
+ save = rl_numeric_arg;
+ rl_numeric_arg = _rl_digit_value (c);
+ rl_explicit_arg = 1;
+ RL_SETSTATE (RL_STATE_NUMERICARG);
+ rl_digit_loop1 ();
+ rl_numeric_arg *= save;
+ c = rl_vi_domove_getchar (m);
+ if (c < 0)