From 64ecf5ca769f74266d8c5a1bdf577cf4645a1985 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Fri, 1 Oct 2010 00:59:33 +0200 Subject: vim_mode: Fix esc in ex mode leaving the prompt unchanged. --- vim-mode/vim_mode.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index 4ce53f6..fe7fb58 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -1402,7 +1402,6 @@ sub handle_command_ex { } elsif ($key == 10) { print "Run ex-mode command" if DEBUG; cmd_ex_command(); - _set_prompt(''); @ex_buf = (); _update_mode(M_CMD); @@ -1621,6 +1620,9 @@ sub _update_mode { # It's necessary when pressing enter. } elsif ($mode == M_CMD and $new_mode == M_INS) { $last->{char} = 'i'; + # Make sure prompt is cleared when leaving ex mode. + } elsif ($mode == M_EX and $new_mode != M_EX) { + _set_prompt(''); } $mode = $new_mode; -- cgit v1.2.3