diff options
author | ZyX <kp-pav@yandex.ru> | 2018-04-22 20:06:35 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2018-04-22 20:06:35 +0300 |
commit | 5ba267722cb99b91fedaeae28cc6054072add5c8 (patch) | |
tree | 429a1e2bf1a35bb593c1de7e9b421e6edf572434 | |
parent | 0eaecbaf47704b8b0b108dd44ad949f3cc9cf501 (diff) | |
download | rneovim-5ba267722cb99b91fedaeae28cc6054072add5c8.tar.gz rneovim-5ba267722cb99b91fedaeae28cc6054072add5c8.tar.bz2 rneovim-5ba267722cb99b91fedaeae28cc6054072add5c8.zip |
syntax: Fix PVS/V560: condition checked in previous if()
-rw-r--r-- | src/nvim/syntax.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index 2613c09c19..261952cb7c 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -5721,13 +5721,9 @@ int syn_get_id( { // When the position is not after the current position and in the same // line of the same buffer, need to restart parsing. - if (wp->w_buffer != syn_buf - || lnum != current_lnum - || col < current_col) { + if (wp->w_buffer != syn_buf || lnum != current_lnum || col < current_col) { syntax_start(wp, lnum); - } else if (wp->w_buffer == syn_buf - && lnum == current_lnum - && col > current_col) { + } else if (lnum == current_lnum && col > current_col) { // next_match may not be correct when moving around, e.g. with the // "skip" expression in searchpair() next_match_idx = -1; |