mirror of
https://github.com/neovim/neovim.git
synced 2025-11-27 12:40:39 +00:00
syntax: Fix PVS/V560: condition checked in previous if()
This commit is contained in:
@@ -5721,13 +5721,9 @@ int syn_get_id(
|
|||||||
{
|
{
|
||||||
// When the position is not after the current position and in the same
|
// When the position is not after the current position and in the same
|
||||||
// line of the same buffer, need to restart parsing.
|
// line of the same buffer, need to restart parsing.
|
||||||
if (wp->w_buffer != syn_buf
|
if (wp->w_buffer != syn_buf || lnum != current_lnum || col < current_col) {
|
||||||
|| lnum != current_lnum
|
|
||||||
|| col < current_col) {
|
|
||||||
syntax_start(wp, lnum);
|
syntax_start(wp, lnum);
|
||||||
} else if (wp->w_buffer == syn_buf
|
} else if (lnum == current_lnum && col > current_col) {
|
||||||
&& lnum == current_lnum
|
|
||||||
&& col > current_col) {
|
|
||||||
// next_match may not be correct when moving around, e.g. with the
|
// next_match may not be correct when moving around, e.g. with the
|
||||||
// "skip" expression in searchpair()
|
// "skip" expression in searchpair()
|
||||||
next_match_idx = -1;
|
next_match_idx = -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user