aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/syntax.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-08-01 06:05:29 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-08-01 06:18:52 +0800
commitc9ca90229b9b46782cad83502caaccaa7520dc0d (patch)
tree57f907f8587266cf46fe7979aacaab7a9d917641 /src/nvim/syntax.c
parent68ec497d52bc8e93e12c74099ee9826b9469c3be (diff)
downloadrneovim-c9ca90229b9b46782cad83502caaccaa7520dc0d.tar.gz
rneovim-c9ca90229b9b46782cad83502caaccaa7520dc0d.tar.bz2
rneovim-c9ca90229b9b46782cad83502caaccaa7520dc0d.zip
vim-patch:9.0.0124: code has more indent than needed
Problem: Code has more indent than needed. Solution: Use continue and return statements. (closes vim/vim#10824) https://github.com/vim/vim/commit/101d57b34b72f4fbc7df1b6edfd64c64a6be14fc
Diffstat (limited to 'src/nvim/syntax.c')
-rw-r--r--src/nvim/syntax.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c
index 3c37dbe450..4ec4a57d68 100644
--- a/src/nvim/syntax.c
+++ b/src/nvim/syntax.c
@@ -1390,24 +1390,21 @@ static bool syn_stack_equal(synstate_T *sp)
if (bp[i].bs_extmatch == CUR_STATE(i).si_extmatch) {
continue;
}
- // When the extmatch pointers are different, the strings in
- // them can still be the same. Check if the extmatch
- // references are equal.
+ // When the extmatch pointers are different, the strings in them can
+ // still be the same. Check if the extmatch references are equal.
bsx = bp[i].bs_extmatch;
six = CUR_STATE(i).si_extmatch;
- // If one of the extmatch pointers is NULL the states are
- // different.
+ // If one of the extmatch pointers is NULL the states are different.
if (bsx == NULL || six == NULL) {
break;
}
int j;
for (j = 0; j < NSUBEXP; j++) {
- // Check each referenced match string. They must all be
- // equal.
+ // Check each referenced match string. They must all be equal.
if (bsx->matches[j] != six->matches[j]) {
- // If the pointer is different it can still be the
- // same text. Compare the strings, ignore case when
- // the start item has the sp_ic flag set.
+ // If the pointer is different it can still be the same text.
+ // Compare the strings, ignore case when the start item has the
+ // sp_ic flag set.
if (bsx->matches[j] == NULL || six->matches[j] == NULL) {
break;
}
@@ -1422,11 +1419,7 @@ static bool syn_stack_equal(synstate_T *sp)
break;
}
}
- if (i < 0) {
- return true;
- }
-
- return false;
+ return i < 0 ? true : false;
}
/*