diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-03-10 15:01:02 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-10 15:01:02 +0800 |
commit | 9e9322b222566c0f92bb6df034d9b316317c81d5 (patch) | |
tree | 8dc2885e2b65ac1eb4e973bc44face735b5c013f | |
parent | a7b1c8893c602196541e94b8b24c4c70c32c25b0 (diff) | |
parent | 05f643f9d235b0db881acf94ce05ad3359ffb058 (diff) | |
download | rneovim-9e9322b222566c0f92bb6df034d9b316317c81d5.tar.gz rneovim-9e9322b222566c0f92bb6df034d9b316317c81d5.tar.bz2 rneovim-9e9322b222566c0f92bb6df034d9b316317c81d5.zip |
Merge pull request #17653 from dundargoc/chore/lgtm
fix lgtm warnings
-rwxr-xr-x | src/clint.py | 2 | ||||
-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 |
7 files changed, 7 insertions, 12 deletions
diff --git a/src/clint.py b/src/clint.py index 37b44920af..10f33d22e2 100755 --- a/src/clint.py +++ b/src/clint.py @@ -369,7 +369,7 @@ def Search(pattern, s): return _regexp_compile_cache[pattern].search(s) -class _IncludeState(dict): +class _IncludeState(dict): # lgtm [py/missing-equals] """Tracks line numbers for includes, and the order in which includes appear. 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 23db7fe5a3..244a1881aa 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -7379,7 +7379,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) { |