diff options
-rw-r--r-- | src/nvim/arabic.c | 4 | ||||
-rw-r--r-- | src/nvim/edit.c | 4 | ||||
-rw-r--r-- | src/nvim/fileio.c | 3 | ||||
-rw-r--r-- | src/nvim/normal.c | 2 | ||||
-rw-r--r-- | src/nvim/option.c | 1 | ||||
-rw-r--r-- | src/nvim/screen.c | 4 |
6 files changed, 7 insertions, 11 deletions
diff --git a/src/nvim/arabic.c b/src/nvim/arabic.c index 7f12c0c798..9fba38a49f 100644 --- a/src/nvim/arabic.c +++ b/src/nvim/arabic.c @@ -719,9 +719,7 @@ int arabic_shape(int c, int *ccp, int *c1p, int prev_c, int prev_c1, // half-shape current and previous character int shape_c = half_shape(prev_c); - // Save away current character - int curr_c = c; - + int curr_c; int curr_laa = A_firstc_laa(c, *c1p); int prev_laa = A_firstc_laa(prev_c, prev_c1); diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 36acc10f98..962ef9b245 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -3810,10 +3810,10 @@ static void 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 (buf == curbuf) { // first call for this flag/expansion + if (buf == curbuf || wp == NULL) { // first call for this flag/expansion wp = curwin; } assert(wp); diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index e1e34bf24a..a542bb19dd 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -1652,9 +1652,6 @@ failed: # ifdef HAVE_ICONV if (iconv_fd != (iconv_t)-1) { iconv_close(iconv_fd); -# ifndef __clang_analyzer__ - iconv_fd = (iconv_t)-1; -# endif } # endif diff --git a/src/nvim/normal.c b/src/nvim/normal.c index a2060b91f7..f93d772068 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -168,7 +168,7 @@ static const struct nv_cmd { { NL, nv_down, 0, false }, { Ctrl_K, nv_error, 0, 0 }, { Ctrl_L, nv_clear, 0, 0 }, - { Ctrl_M, nv_down, 0, true }, + { CAR, nv_down, 0, true }, { Ctrl_N, nv_down, NV_STS, false }, { Ctrl_O, nv_ctrlo, 0, 0 }, { Ctrl_P, nv_up, NV_STS, false }, diff --git a/src/nvim/option.c b/src/nvim/option.c index f41c0761cc..d60c8bc01c 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -4338,6 +4338,7 @@ static char *set_num_option(int opt_idx, char_u *varp, long value, char buf_old[NUMBUFLEN]; char buf_new[NUMBUFLEN]; char buf_type[7]; + vim_snprintf(buf_old, ARRAY_SIZE(buf_old), "%ld", old_value); vim_snprintf(buf_new, ARRAY_SIZE(buf_new), "%ld", value); vim_snprintf(buf_type, ARRAY_SIZE(buf_type), "%s", diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 07c959b257..3a6d289176 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -3883,8 +3883,8 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, /* check if line ends before left margin */ if (vcol < v + col - win_col_off(wp)) vcol = v + col - win_col_off(wp); - /* Get rid of the boguscols now, we want to draw until the right - * edge for 'cursorcolumn'. */ + // Get rid of the boguscols now, we want to draw until the right + // edge for 'cursorcolumn'. col -= boguscols; // boguscols = 0; // Disabled because value never read after this |