diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2015-02-20 08:31:38 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2015-02-20 09:43:13 -0300 |
commit | 9894720a0557cb80e11d33cb3b3a8fbf23827b9c (patch) | |
tree | a638154e09655a41c224ffeedf19234766b261c3 /src | |
parent | c65f18f686e31fd5c35bf5017e377950202b9a31 (diff) | |
download | rneovim-9894720a0557cb80e11d33cb3b3a8fbf23827b9c.tar.gz rneovim-9894720a0557cb80e11d33cb3b3a8fbf23827b9c.tar.bz2 rneovim-9894720a0557cb80e11d33cb3b3a8fbf23827b9c.zip |
tui: Don't use 'timeout' for determining esc timeout
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/tui/term_input.inl | 14 |
1 files changed, 4 insertions, 10 deletions
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; } |