diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-01-13 23:09:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-13 23:09:59 +0100 |
commit | a3d8cd3f69807d70d00eb58d4a654dde8ecda0e3 (patch) | |
tree | bbd5c9b9c1e873099cd8f222707d680fd850721a /src/nvim/ex_getln.c | |
parent | 61ec31cde1373033179985f737b55e05cc1a2df7 (diff) | |
parent | 4cba75dab08ce718ff3e7500ca943789c1099c4e (diff) | |
download | rneovim-a3d8cd3f69807d70d00eb58d4a654dde8ecda0e3.tar.gz rneovim-a3d8cd3f69807d70d00eb58d4a654dde8ecda0e3.tar.bz2 rneovim-a3d8cd3f69807d70d00eb58d4a654dde8ecda0e3.zip |
Merge #9471 from justinmk/pvs-warnings
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r-- | src/nvim/ex_getln.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index 4ea25117d9..8efb027575 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -1808,7 +1808,6 @@ static int command_line_changed(CommandLineState *s) if (has_event(EVENT_CMDLINECHANGED)) { TryState tstate; Error err = ERROR_INIT; - bool tl_ret = true; dict_T *dict = get_vim_var_dict(VV_EVENT); char firstcbuf[2]; @@ -1825,14 +1824,13 @@ static int command_line_changed(CommandLineState *s) (char_u *)firstcbuf, false, curbuf); tv_dict_clear(dict); - tl_ret = try_leave(&tstate, &err); + bool tl_ret = try_leave(&tstate, &err); if (!tl_ret && ERROR_SET(&err)) { msg_putchar('\n'); msg_printf_attr(HL_ATTR(HLF_E)|MSG_HIST, (char *)e_autocmd_err, err.msg); api_clear_error(&err); redrawcmd(); } - tl_ret = true; } // 'incsearch' highlighting. @@ -5933,6 +5931,7 @@ void ex_history(exarg_T *eap) for (; !got_int && histype1 <= histype2; ++histype1) { STRCPY(IObuff, "\n # "); + assert(history_names[histype1] != NULL); STRCAT(STRCAT(IObuff, history_names[histype1]), " history"); MSG_PUTS_TITLE(IObuff); idx = hisidx[histype1]; |