diff options
| author | Simon Ruderich <simon@ruderich.org> | 2010-09-26 21:10:53 +0000 | 
|---|---|---|
| committer | Simon Ruderich <simon@ruderich.org> | 2010-09-26 21:19:44 +0000 | 
| commit | 1ad532d8e277e0cfef1784ced89ad4db73ca559c (patch) | |
| tree | b5e601e611537dd27079362bbb0bb3aaafe0ad81 /vim-mode | |
| parent | first steps towards undo (diff) | |
| download | irssi-scripts-1ad532d8e277e0cfef1784ced89ad4db73ca559c.tar.gz irssi-scripts-1ad532d8e277e0cfef1784ced89ad4db73ca559c.zip | |
vim_mode: Minor code restructure. No functional changes.
Diffstat (limited to '')
| -rw-r--r-- | vim-mode/vim_mode.pl | 22 | 
1 files changed, 12 insertions, 10 deletions
| diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index 90391da..91fbc0e 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -718,17 +718,19 @@ sub handle_command {              my $skip = 0; -            # . repeats the last command. -            if ($char eq '.' and !$movement and defined $last->{char}) { -                $char = $last->{char}; -                # If . is given a count then it replaces original count. -                if (not defined $numeric_prefix) { -                    $numeric_prefix = $last->{numeric_prefix}; +            if (!$movement) { +                # . repeats the last command. +                if ($char eq '.' and defined $last->{char}) { +                    $char = $last->{char}; +                    # 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}; +                } elsif ($char eq '.') { +                    $skip = 1;                  } -                $operator = $last->{operator}; -                $movement = $last->{movement}; -            } elsif ($char eq '.') { -                $skip = 1;              }              if ($skip) { | 
