From 9894720a0557cb80e11d33cb3b3a8fbf23827b9c Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Fri, 20 Feb 2015 08:31:38 -0300 Subject: tui: Don't use 'timeout' for determining esc timeout --- src/nvim/tui/term_input.inl | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/nvim/tui/term_input.inl b/src/nvim/tui/term_input.inl index 6b8e3197ba..9a40a64ed9 100644 --- a/src/nvim/tui/term_input.inl +++ b/src/nvim/tui/term_input.inl @@ -112,17 +112,11 @@ static void timer_cb(uv_timer_t *handle); static int get_key_code_timeout(void) { - Integer ms = 0; - bool timeout = false; - // Check 'timeout' and 'ttimeout' to determine if we should send ESC - // after 'ttimeoutlen'. See :help 'ttimeout' for more information + Integer ms = -1; + // Check 'ttimeout' to determine if we should send ESC after 'ttimeoutlen'. + // See :help 'ttimeout' for more information Error err = ERROR_INIT; - timeout = vim_get_option(cstr_as_string("timeout"), &err).data.boolean; - if (!timeout) { - timeout = vim_get_option(cstr_as_string("ttimeout"), &err).data.boolean; - } - - if (timeout) { + if (vim_get_option(cstr_as_string("ttimeout"), &err).data.boolean) { ms = vim_get_option(cstr_as_string("ttimeoutlen"), &err).data.integer; } -- cgit