aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/syntax.c
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2023-12-16 22:14:28 +0100
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2023-12-19 11:43:21 +0100
commit7f6b775b45de5011ff1c44e63e57551566d80704 (patch)
tree54eab8482051d2d1a958fcf9f6c9bcbb02827717 /src/nvim/syntax.c
parent693aea0e9e1032aee85d56c1a3f33e0811dbdc18 (diff)
downloadrneovim-7f6b775b45de5011ff1c44e63e57551566d80704.tar.gz
rneovim-7f6b775b45de5011ff1c44e63e57551566d80704.tar.bz2
rneovim-7f6b775b45de5011ff1c44e63e57551566d80704.zip
refactor: use `bool` to represent boolean values
Diffstat (limited to 'src/nvim/syntax.c')
-rw-r--r--src/nvim/syntax.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c
index f6f0fca74a..d5ee93914a 100644
--- a/src/nvim/syntax.c
+++ b/src/nvim/syntax.c
@@ -4811,12 +4811,9 @@ static char *get_syn_pattern(char *arg, synpat_T *ci)
static void syn_cmd_sync(exarg_T *eap, int syncing)
{
char *arg_start = eap->arg;
- char *arg_end;
char *key = NULL;
- char *next_arg;
- int illegal = false;
- int finished = false;
- char *cpo_save;
+ bool illegal = false;
+ bool finished = false;
if (ends_excmd(*arg_start)) {
syn_cmd_list(eap, true);
@@ -4824,8 +4821,8 @@ static void syn_cmd_sync(exarg_T *eap, int syncing)
}
while (!ends_excmd(*arg_start)) {
- arg_end = skiptowhite(arg_start);
- next_arg = skipwhite(arg_end);
+ char *arg_end = skiptowhite(arg_start);
+ char *next_arg = skipwhite(arg_end);
xfree(key);
key = vim_strnsave_up(arg_start, (size_t)(arg_end - arg_start));
if (strcmp(key, "CCOMMENT") == 0) {
@@ -4895,7 +4892,7 @@ static void syn_cmd_sync(exarg_T *eap, int syncing)
curwin->w_s->b_syn_linecont_ic = curwin->w_s->b_syn_ic;
// Make 'cpoptions' empty, to avoid the 'l' flag
- cpo_save = p_cpo;
+ char *cpo_save = p_cpo;
p_cpo = empty_string_option;
curwin->w_s->b_syn_linecont_prog =
vim_regcomp(curwin->w_s->b_syn_linecont_pat, RE_MAGIC);