From d2bd3b20eacf6b74929e3a9d303e6a608f739732 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 26 Sep 2010 18:39:58 +0200 Subject: vim_mode: If . is given a count it replaces original count. --- vim-mode/vim_mode.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index 4b3a8ba..104b044 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -662,11 +662,12 @@ sub handle_command { # . repeats the last command. if ($char eq '.' and !$movement and defined $last->{char}) { $char = $last->{char}; - $numeric_prefix = $last->{numeric_prefix}; + # If . is given a count then it replaces original count. + if (not defined $numeric_prefix) { + $numeric_prefix = $last->{numeric_prefix}; + } $operator = $last->{operator}; $movement = $last->{movement}; - print "Repeating: $numeric_prefix$operator$char ($movement)" - if DEBUG; } $numeric_prefix = 1 if not $numeric_prefix; -- cgit v1.2.3