aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/syntax.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-07-04 23:50:57 +0200
committerGitHub <noreply@github.com>2017-07-04 23:50:57 +0200
commit69f0847ccc79acabb1cad5b1b54c906973946d81 (patch)
treef44ee09707eacbe75c8e3ff1be4ad53e0f5080ef /src/nvim/syntax.c
parent1b70a1da0438018475a73e23015421b2212b34df (diff)
parentce30998221a53e208a6a68b4b0a3f76db9a5eac3 (diff)
downloadrneovim-69f0847ccc79acabb1cad5b1b54c906973946d81.tar.gz
rneovim-69f0847ccc79acabb1cad5b1b54c906973946d81.tar.bz2
rneovim-69f0847ccc79acabb1cad5b1b54c906973946d81.zip
Merge #6959 from ZyX-I/pvs-fixes
Diffstat (limited to 'src/nvim/syntax.c')
-rw-r--r--src/nvim/syntax.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c
index a4bb260183..f0171fa525 100644
--- a/src/nvim/syntax.c
+++ b/src/nvim/syntax.c
@@ -1666,8 +1666,9 @@ syn_current_attr (
* If we found a match after the last column, use it.
*/
if (next_match_idx >= 0 && next_match_col >= (int)current_col
- && next_match_col != MAXCOL)
- (void)push_next_match(NULL);
+ && next_match_col != MAXCOL) {
+ (void)push_next_match();
+ }
current_finished = TRUE;
current_state_stored = FALSE;
@@ -1985,9 +1986,10 @@ syn_current_attr (
* endless loop). */
GA_APPEND(int, &zero_width_next_ga, next_match_idx);
next_match_idx = -1;
- } else
- cur_si = push_next_match(cur_si);
- found_match = TRUE;
+ } else {
+ cur_si = push_next_match();
+ }
+ found_match = true;
}
}
}
@@ -2167,9 +2169,10 @@ static int did_match_already(int idx, garray_T *gap)
/*
* Push the next match onto the stack.
*/
-static stateitem_T *push_next_match(stateitem_T *cur_si)
+static stateitem_T *push_next_match(void)
{
- synpat_T *spp;
+ stateitem_T *cur_si;
+ synpat_T *spp;
int save_flags;
spp = &(SYN_ITEMS(syn_block)[next_match_idx]);