diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/tui/input.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/tui/input.c b/src/nvim/tui/input.c index be016668fc..b86ab8cf2f 100644 --- a/src/nvim/tui/input.c +++ b/src/nvim/tui/input.c @@ -223,10 +223,12 @@ static int get_key_code_timeout(void) { Integer ms = -1; // Check 'ttimeout' to determine if we should send ESC after 'ttimeoutlen'. - // See :help 'ttimeout' for more information Error err = ERROR_INIT; if (nvim_get_option(cstr_as_string("ttimeout"), &err).data.boolean) { - ms = nvim_get_option(cstr_as_string("ttimeoutlen"), &err).data.integer; + Object rv = nvim_get_option(cstr_as_string("ttimeoutlen"), &err); + if (!ERROR_SET(&err)) { + ms = rv.data.integer; + } } api_clear_error(&err); return (int)ms; |