From a18073ddb36993fdd63e4094113fe2c580efe5c3 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sat, 2 Oct 2010 18:20:33 +0200 Subject: vim_mode: Fix j from destroying the input line. --- vim-mode/vim_mode.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'vim-mode') diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl index 7bf6e28..1c282ad 100644 --- a/vim-mode/vim_mode.pl +++ b/vim-mode/vim_mode.pl @@ -490,8 +490,12 @@ sub cmd_movement_j { if (defined $history_index) { $history_index += $count; print "History Index: $history_index" if DEBUG; + # Prevent destroying the current input when pressing j after entering + # command mode. Not exactly like in default irssi, but simplest solution + # (and S can be used to clear the input line fast, which is what + # does in plain irssi). } else { - $history_index = $#history; + return (undef, undef); } if ($history_index > $#history) { -- cgit v1.2.3