diff options
Diffstat (limited to 'src/nvim/terminal.c')
-rw-r--r-- | src/nvim/terminal.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c index 85c4950b42..c44fe15be5 100644 --- a/src/nvim/terminal.c +++ b/src/nvim/terminal.c @@ -1,3 +1,6 @@ +// This is an open source non-commercial project. Dear PVS-Studio, please check +// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com + // VT220/xterm-like terminal emulator. // Powered by libvterm http://www.leonerd.org.uk/code/libvterm // @@ -630,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) @@ -1217,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) |