aboutsummaryrefslogtreecommitdiffstats
path: root/vim-mode
diff options
context:
space:
mode:
authorTom Feist <shabble@metavore.org>2011-04-28 20:28:05 +0000
committerTom Feist <shabble@metavore.org>2011-04-28 20:28:05 +0000
commit7024ce8bbd73bec98fd7ad27014b5aa36af5f8f8 (patch)
tree702d2e2668875e735007a3b93356a5fbf97030e7 /vim-mode
parentnotifyquit: fixed check_watchlist test to pass a channel name, not an object. (diff)
downloadirssi-scripts-7024ce8bbd73bec98fd7ad27014b5aa36af5f8f8.tar.gz
irssi-scripts-7024ce8bbd73bec98fd7ad27014b5aa36af5f8f8.zip
vim-mode/vim_mode: added new setting: 'esc_buf_timeout',
It determines the amount of time between escape being pressed and other keys being assumed to be part of an escape (meta-) sequence. Defaults to 10ms. Be careful changing it.
Diffstat (limited to '')
-rw-r--r--vim-mode/vim_mode.pl11
1 files changed, 9 insertions, 2 deletions
diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl
index 7c5f957..7a23d0b 100644
--- a/vim-mode/vim_mode.pl
+++ b/vim-mode/vim_mode.pl
@@ -888,6 +888,9 @@ my $settings
prompt_leading_space => { type => S_BOOL, value => 1 },
# <Leader> value for prepending to commands.
map_leader => { type => S_STR, value => '\\' },
+ # timeout for keys following esc. In milliseconds.
+ esc_buf_timeout => { type => S_INT, value => 10 },
+
};
sub DEBUG { $settings->{debug}->{value} }
@@ -2701,8 +2704,12 @@ sub got_key {
# NOTE: this timeout might be too low on laggy systems, but
# it comes at the cost of keystroke latency for things that
# contain escape sequences (arrow keys, etc)
- $input_buf_timer
- = Irssi::timeout_add_once(10, \&handle_input_buffer, undef);
+ my $esc_buf_timeout = $settings->{input_buf_timeout};
+
+ $esc_buf_timer
+ = Irssi::timeout_add_once($esc_buf_timeout,
+ \&handle_input_buffer, undef);
+
print "Buffer Timer tag: $input_buf_timer" if DEBUG;
} elsif ($mode == M_INS) {