diff options
author | Dundar Göc <gocdundar@gmail.com> | 2022-03-08 19:58:45 +0100 |
---|---|---|
committer | Dundar Göc <gocdundar@gmail.com> | 2022-03-09 09:29:57 +0100 |
commit | 05f643f9d235b0db881acf94ce05ad3359ffb058 (patch) | |
tree | 99f5f801df3609f4c44dc89f8e1094a7b516f748 | |
parent | f27068caad517c52e700477d51343cbebd8d4df0 (diff) | |
download | rneovim-05f643f9d235b0db881acf94ce05ad3359ffb058.tar.gz rneovim-05f643f9d235b0db881acf94ce05ad3359ffb058.tar.bz2 rneovim-05f643f9d235b0db881acf94ce05ad3359ffb058.zip |
chore(lgtm): fix "empty block without comment" warnings
-rw-r--r-- | src/nvim/eval/funcs.c | 3 | ||||
-rw-r--r-- | src/nvim/fileio.c | 3 | ||||
-rw-r--r-- | src/nvim/lua/xdiff.c | 1 | ||||
-rw-r--r-- | src/nvim/marktree.c | 2 | ||||
-rw-r--r-- | src/nvim/normal.c | 7 | ||||
-rw-r--r-- | src/nvim/ops.c | 1 |
6 files changed, 6 insertions, 11 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index f47c9c482b..d81a408663 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -9706,8 +9706,7 @@ free_lstval: if (set_unnamed) { // Discard the result. We already handle the error case. - if (op_reg_set_previous(regname)) { - } + op_reg_set_previous(regname); } } diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index c5a89d3371..971ae9abae 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -4961,9 +4961,8 @@ int buf_check_timestamp(buf_T *buf) buf_store_file_info(buf, &file_info); } - // Don't do anything for a directory. Might contain the file - // explorer. if (os_isdir(buf->b_fname)) { + // Don't do anything for a directory. Might contain the file explorer. } else if ((buf->b_p_ar >= 0 ? buf->b_p_ar : p_ar) && !bufIsChanged(buf) && file_info_ok) { // If 'autoread' is set, the buffer has no changes and the file still diff --git a/src/nvim/lua/xdiff.c b/src/nvim/lua/xdiff.c index ea7a700e1e..37855630d1 100644 --- a/src/nvim/lua/xdiff.c +++ b/src/nvim/lua/xdiff.c @@ -171,6 +171,7 @@ static NluaXdiffMode process_xdl_diff_opts(lua_State *lstate, xdemitconf_t *cfg, goto exit_1; } if (strequal("unified", v->data.string.data)) { + // the default } else if (strequal("indices", v->data.string.data)) { had_result_type_indices = true; } else { diff --git a/src/nvim/marktree.c b/src/nvim/marktree.c index d2354dbf6b..4456b28293 100644 --- a/src/nvim/marktree.c +++ b/src/nvim/marktree.c @@ -1159,8 +1159,6 @@ static size_t check_node(MarkTree *b, mtnode_t *x, mtpos_t *last, bool *last_rig if (i > 0) { unrelative(x->key[i-1].pos, last); } - if (x->level) { - } assert(pos_leq(*last, x->key[i].pos)); if (last->row == x->key[i].pos.row && last->col == x->key[i].pos.col) { assert(!*last_right || mt_right(x->key[i])); diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 7fe6469527..5c39e9c8bf 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -2105,10 +2105,9 @@ bool do_mouse(oparg_T *oap, int c, int dir, long count, bool fixindent) } else { // MOUSE_RIGHT stuffcharReadbuff('#'); } - } - // Handle double clicks, unless on status line - else if (in_status_line) { - } else if (in_sep_line) { + } else if (in_status_line || in_sep_line) { + // Do nothing if on status line or vertical separator + // Handle double clicks otherwise } else if ((mod_mask & MOD_MASK_MULTI_CLICK) && (State & (NORMAL | INSERT))) { if (is_click || !VIsual_active) { if (VIsual_active) { diff --git a/src/nvim/ops.c b/src/nvim/ops.c index 3f51210781..09b00a1d91 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -7382,7 +7382,6 @@ const yankreg_T *op_reg_get(const char name) /// /// @return true on success, false on failure. bool op_reg_set_previous(const char name) - FUNC_ATTR_WARN_UNUSED_RESULT { int i = op_reg_index(name); if (i == -1) { |