summaryrefslogtreecommitdiffstats
path: root/src/edit.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-03-21 21:45:34 +0100
committerBram Moolenaar <Bram@vim.org>2019-03-21 21:45:34 +0100
commit2c519cf3bfe76083767ac94c674d2e161ed36587 (patch)
tree6386fbe43e4c710c1a31fe28ea3989cfe35e96a8 /src/edit.c
parentf7e47af7760fe054cb645dac9a1e96b23c85804d (diff)
patch 8.1.1032: warnings from clang static analyzerv8.1.1032
Problem: Warnings from clang static analyzer. (Yegappan Lakshmanan) Solution: Fix relevant warnings.
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/edit.c b/src/edit.c
index 2f81b52dff..452d4a6dc7 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -4109,11 +4109,11 @@ ins_compl_fixRedoBufForLeader(char_u *ptr_arg)
static buf_T *
ins_compl_next_buf(buf_T *buf, int flag)
{
- static win_T *wp;
+ static win_T *wp = NULL;
- if (flag == 'w') /* just windows */
+ if (flag == 'w') // just windows
{
- if (buf == curbuf) /* first call for this flag/expansion */
+ if (buf == curbuf || wp == NULL) // first call for this flag/expansion
wp = curwin;
while ((wp = (wp->w_next != NULL ? wp->w_next : firstwin)) != curwin
&& wp->w_buffer->b_scanned)