aboutsummaryrefslogtreecommitdiffstats
path: root/vim-mode/vim_mode.pl
diff options
context:
space:
mode:
authorTom Feist <shabble@metavore.org>2010-09-27 19:25:56 +0000
committerTom Feist <shabble@metavore.org>2010-09-27 19:25:56 +0000
commit2d640cdef4deba72663da973151f83b96f1e7118 (patch)
treef836682e6f7329987f35eacaba191554326bcd74 /vim-mode/vim_mode.pl
parentadded vim_mode_debug setting as a boolean to control whether (large amounts of) (diff)
downloadirssi-scripts-2d640cdef4deba72663da973151f83b96f1e7118.tar.gz
irssi-scripts-2d640cdef4deba72663da973151f83b96f1e7118.zip
fixed _commit_line to ignore empty lines (to aavoid insufficient args to /say error)
Diffstat (limited to 'vim-mode/vim_mode.pl')
-rw-r--r--vim-mode/vim_mode.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl
index f63c5a8..cd01be5 100644
--- a/vim-mode/vim_mode.pl
+++ b/vim-mode/vim_mode.pl
@@ -243,7 +243,7 @@ sub cmd_undo {
$undo_index++;
}
print "Undoing entry $undo_index of " . $#undo_buffer;
-
+
_restore_undo_entry($undo_index);
}
@@ -1104,6 +1104,8 @@ sub _commit_line {
_update_mode(M_INS);
_clear_undo_buffer();
+ return unless length $line; # ignore empty lines
+
if ($line =~ /^[\Q$cmdchars\E]/) {
print "Committing line as command" if DEBUG;
Irssi::command($line);