aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Feist <shabble@metavore.org>2010-09-30 22:05:17 +0000
committerTom Feist <shabble@metavore.org>2010-09-30 22:05:17 +0000
commitc1f4136e56777854b1d80c9e587a0395407d55fe (patch)
treef809ae680d4aa72ab1a53d5fc5b75f669eb75425
parentupdated test irssi config with /vim and /unvim commands for easy reloading. (diff)
parentvim_mode: Implement black hole register. (diff)
downloadirssi-scripts-c1f4136e56777854b1d80c9e587a0395407d55fe.tar.gz
irssi-scripts-c1f4136e56777854b1d80c9e587a0395407d55fe.zip
Merge remote branch 'origin/dev'
-rw-r--r--vim-mode/vim_mode.pl10
1 files changed, 10 insertions, 0 deletions
diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl
index 0189041..366bc3f 100644
--- a/vim-mode/vim_mode.pl
+++ b/vim-mode/vim_mode.pl
@@ -186,6 +186,7 @@ my $registers
'"' => '', # default register
'+' => '', # contains irssi's cut buffer
'*' => '', # same
+ '_' => '', # black hole register, always empty
};
foreach my $char ('a' .. 'z') {
$registers->{$char} = '';
@@ -802,6 +803,11 @@ sub cmd_movement_register {
return;
}
+ # make sure black hole register is always empty
+ if ($char eq '_') {
+ $registers->{_} = '';
+ }
+
# + and * contain both irssi's cut-buffer
if ($char eq '+' or $char eq '*') {
$registers->{'+'} = Irssi::parse_special('$U');
@@ -1126,6 +1132,9 @@ sub flush_input_buffer {
# see what we've collected.
print "Input buffer flushed" if DEBUG;
+ # Add the characters to @insert_buf so they can be repeated.
+ push @insert_buf, map chr, @input_buf;
+
_emulate_keystrokes(@input_buf);
@input_buf = ();
@@ -1395,6 +1404,7 @@ sub setup_changed {
sub UNLOAD {
Irssi::signal_remove('gui key pressed' => \&got_key);
Irssi::statusbar_item_unregister ('vim_mode');
+ Irssi::statusbar_item_unregister ('vim_windows');
}