diff options
author | Simon Ruderich <simon@ruderich.org> | 2010-09-27 16:58:11 +0000 |
---|---|---|
committer | Simon Ruderich <simon@ruderich.org> | 2010-09-27 19:22:32 +0000 |
commit | 8bdc72c608d4c9940d2af11294e5eccdbfc9a225 (patch) | |
tree | 076672c77e08451abda6c9b0163687ff0ad2ce6d | |
parent | added vim_mode_debug setting as a boolean to control whether (large amounts of) (diff) | |
download | irssi-scripts-8bdc72c608d4c9940d2af11294e5eccdbfc9a225.tar.gz irssi-scripts-8bdc72c608d4c9940d2af11294e5eccdbfc9a225.zip |
vim_mode: Always reset command mode status when entering command mode.
-rw-r--r-- | vim-mode/vim_mode.pl | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index f63c5a8..5d96893 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -814,13 +814,6 @@ sub handle_input_buffer { print "Enter Command Mode" if DEBUG; _update_mode(M_CMD); - # Reset every command mode related setting as a fallback in case - # something goes wrong. - $numeric_prefix = undef; - $operator = undef; - $movement = undef; - $register = '"'; - } else { # we need to identify what we got, and either replay it # or pass it off to the command handler. @@ -1167,7 +1160,15 @@ sub _update_mode { if ($mode == M_INS) { $history_index = undef; $register = '"'; + # Reset every command mode related status as a fallback in case something + # goes wrong. + } elsif ($mode == M_CMD) { + $numeric_prefix = undef; + $operator = undef; + $movement = undef; + $register = '"'; } + Irssi::statusbar_items_redraw("vim_mode"); } |