diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2017-04-24 02:14:14 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-24 02:14:14 +0200 |
| commit | 7f6d3d305269fd1139bc2aec9a91bf98ad595199 (patch) | |
| tree | 965d18fb11d25959e709a18d1c9d1fca0c4df432 /src/nvim/tui | |
| parent | 1fe8945748620713402cab77a46501ec5311778b (diff) | |
| parent | 086c354a0aad2769042dc91bf5bad021109f56e4 (diff) | |
| download | rneovim-7f6d3d305269fd1139bc2aec9a91bf98ad595199.tar.gz rneovim-7f6d3d305269fd1139bc2aec9a91bf98ad595199.tar.bz2 rneovim-7f6d3d305269fd1139bc2aec9a91bf98ad595199.zip | |
Merge #6569 from justinmk/apierror
api: Do not truncate errors <1 MB
Diffstat (limited to 'src/nvim/tui')
| -rw-r--r-- | src/nvim/tui/input.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/nvim/tui/input.c b/src/nvim/tui/input.c index 3f2ccd4746..b86ab8cf2f 100644 --- a/src/nvim/tui/input.c +++ b/src/nvim/tui/input.c @@ -223,12 +223,14 @@ 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; } |