aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Ruderich <simon@ruderich.org>2010-10-02 16:20:33 +0000
committerSimon Ruderich <simon@ruderich.org>2010-10-02 16:20:33 +0000
commita18073ddb36993fdd63e4094113fe2c580efe5c3 (patch)
tree540c0bdc0db0d1324ca96c28aa9a92708277d968
parentvim_mode: Add missing (undef, undef) for clarity. (diff)
downloadirssi-scripts-a18073ddb36993fdd63e4094113fe2c580efe5c3.tar.gz
irssi-scripts-a18073ddb36993fdd63e4094113fe2c580efe5c3.zip
vim_mode: Fix j from destroying the input line.
Diffstat (limited to '')
-rw-r--r--vim-mode/vim_mode.pl6
1 files changed, 5 insertions, 1 deletions
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 <down>
+ # does in plain irssi).
} else {
- $history_index = $#history;
+ return (undef, undef);
}
if ($history_index > $#history) {