aboutsummaryrefslogtreecommitdiffstats
path: root/vim-mode
diff options
context:
space:
mode:
authorSimon Ruderich <simon@ruderich.org>2010-09-26 21:10:53 +0000
committerSimon Ruderich <simon@ruderich.org>2010-09-26 21:19:44 +0000
commit1ad532d8e277e0cfef1784ced89ad4db73ca559c (patch)
treeb5e601e611537dd27079362bbb0bb3aaafe0ad81 /vim-mode
parentfirst steps towards undo (diff)
downloadirssi-scripts-1ad532d8e277e0cfef1784ced89ad4db73ca559c.tar.gz
irssi-scripts-1ad532d8e277e0cfef1784ced89ad4db73ca559c.zip
vim_mode: Minor code restructure. No functional changes.
Diffstat (limited to 'vim-mode')
-rw-r--r--vim-mode/vim_mode.pl22
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) {