aboutsummaryrefslogtreecommitdiffstats
path: root/vim-mode/vim_mode.pl
diff options
context:
space:
mode:
authorSimon Ruderich <simon@ruderich.org>2010-10-06 19:37:33 +0000
committerSimon Ruderich <simon@ruderich.org>2010-10-06 23:22:20 +0000
commita0896e03e25e716c1c3ef76df8feee603dd5d488 (patch)
treeb13dad098549ddc74a5e50151019fba8cd73f4bc /vim-mode/vim_mode.pl
parentvim_mode: Simplify handle_command_cmd() a little. (diff)
downloadirssi-scripts-a0896e03e25e716c1c3ef76df8feee603dd5d488.tar.gz
irssi-scripts-a0896e03e25e716c1c3ef76df8feee603dd5d488.zip
vim_mode: More cleanup of handle_command_cmd().
Diffstat (limited to '')
-rw-r--r--vim-mode/vim_mode.pl13
1 files changed, 6 insertions, 7 deletions
diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl
index 30bab6a..cf53735 100644
--- a/vim-mode/vim_mode.pl
+++ b/vim-mode/vim_mode.pl
@@ -1644,6 +1644,12 @@ sub handle_command_cmd {
# argument.
if ($movement) {
$movement .= $char;
+
+ # Counts
+ } elsif ($char =~ m/[1-9]/ || ($numeric_prefix && $char =~ m/[0-9]/)) {
+ print "Processing numeric prefix: $char" if DEBUG;
+ handle_numeric_prefix($char);
+ return 1; # call _stop()
}
# s is an alias for cl.
@@ -1658,13 +1664,6 @@ sub handle_command_cmd {
$operator = 'c';
}
- if (!$movement && ($char =~ m/[1-9]/ ||
- ($numeric_prefix && $char =~ m/[0-9]/))) {
- print "Processing numeric prefix: $char" if DEBUG;
- handle_numeric_prefix($char);
- return 1; # call _stop()
- }
-
# text-objects (i a) are simulated with $movement
if (!$movement && (exists $movements_multiple->{$char}
or $operator and ($char eq 'i' or $char eq 'a'))) {