diff options
author | Simon Ruderich <simon@ruderich.org> | 2010-09-26 16:39:58 +0000 |
---|---|---|
committer | Simon Ruderich <simon@ruderich.org> | 2010-09-26 16:40:29 +0000 |
commit | d2bd3b20eacf6b74929e3a9d303e6a608f739732 (patch) | |
tree | d23af82f4533e0565442835003d4fcfd78eeade4 /vim-mode | |
parent | vim_mode: Fix operators with h and l. (diff) | |
download | irssi-scripts-d2bd3b20eacf6b74929e3a9d303e6a608f739732.tar.gz irssi-scripts-d2bd3b20eacf6b74929e3a9d303e6a608f739732.zip |
vim_mode: If . is given a count it replaces original count.
Diffstat (limited to 'vim-mode')
-rw-r--r-- | vim-mode/vim_mode.pl | 7 |
1 files 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; |