From 8bdc72c608d4c9940d2af11294e5eccdbfc9a225 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 27 Sep 2010 18:58:11 +0200 Subject: vim_mode: Always reset command mode status when entering command mode. --- vim-mode/vim_mode.pl | 15 ++++++++------- 1 file 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"); } -- cgit v1.2.3