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/terminal.c | |
| 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/terminal.c')
| -rw-r--r-- | src/nvim/terminal.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c index 19b9bdc19f..c44fe15be5 100644 --- a/src/nvim/terminal.c +++ b/src/nvim/terminal.c @@ -633,13 +633,14 @@ static int term_movecursor(VTermPos new, VTermPos old, int visible, static void buf_set_term_title(buf_T *buf, char *title) FUNC_ATTR_NONNULL_ALL { - Error err; + Error err = ERROR_INIT; dict_set_var(buf->b_vars, STATIC_CSTR_AS_STRING("term_title"), STRING_OBJ(cstr_as_string(title)), false, false, &err); + api_clear_error(&err); } static int term_settermprop(VTermProp prop, VTermValue *val, void *data) @@ -1220,12 +1221,14 @@ static bool is_focused(Terminal *term) #define GET_CONFIG_VALUE(k, o) \ do { \ - Error err; \ + Error err = ERROR_INIT; \ /* Only called from terminal_open where curbuf->terminal is the */ \ /* context */ \ o = dict_get_value(curbuf->b_vars, cstr_as_string(k), &err); \ + api_clear_error(&err); \ if (o.type == kObjectTypeNil) { \ o = dict_get_value(&globvardict, cstr_as_string(k), &err); \ + api_clear_error(&err); \ } \ } while (0) |
