aboutsummaryrefslogtreecommitdiffstats
path: root/vim-mode
diff options
context:
space:
mode:
Diffstat (limited to 'vim-mode')
-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) {