aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/buffer.c7
-rw-r--r--src/nvim/ex_cmds.c32
-rw-r--r--src/nvim/ex_docmd.c46
3 files changed, 46 insertions, 39 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index 5007cb5015..7def8c1684 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -2365,10 +2365,11 @@ void buflist_list(exarg_T *eap)
&& (buf == curbuf || curwin->w_alt_fnum != buf->b_fnum))) {
continue;
}
- if (buf_spname(buf) != NULL)
+ if (buf_spname(buf) != NULL) {
STRLCPY(NameBuff, buf_spname(buf), MAXPATHL);
- else
- home_replace(buf, buf->b_fname, NameBuff, MAXPATHL, TRUE);
+ } else {
+ home_replace(buf, buf->b_fname, NameBuff, MAXPATHL, true);
+ }
if (message_filtered(NameBuff)) {
continue;
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index 1b2eb774c9..f73d4c16b6 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -6175,34 +6175,40 @@ char_u *skip_vimgrep_pat(char_u *p, char_u **s, int *flags)
if (vim_isIDc(*p)) {
// ":vimgrep pattern fname"
- if (s != NULL)
+ if (s != NULL) {
*s = p;
+ }
p = skiptowhite(p);
- if (s != NULL && *p != NUL)
+ if (s != NULL && *p != NUL) {
*p++ = NUL;
+ }
} else {
// ":vimgrep /pattern/[g][j] fname"
- if (s != NULL)
+ if (s != NULL) {
*s = p + 1;
+ }
c = *p;
- p = skip_regexp(p + 1, c, TRUE, NULL);
- if (*p != c)
+ p = skip_regexp(p + 1, c, true, NULL);
+ if (*p != c) {
return NULL;
+ }
// Truncate the pattern.
- if (s != NULL)
+ if (s != NULL) {
*p = NUL;
- ++p;
+ }
+ p++;
// Find the flags
while (*p == 'g' || *p == 'j') {
if (flags != NULL) {
- if (*p == 'g')
+ if (*p == 'g') {
*flags |= VGR_GLOBAL;
- else
+ } else {
*flags |= VGR_NOJUMP;
+ }
}
- ++p;
+ p++;
}
}
return p;
@@ -6219,7 +6225,7 @@ void ex_oldfiles(exarg_T *eap)
msg((char_u *)_("No old files"));
} else {
msg_start();
- msg_scroll = TRUE;
+ msg_scroll = true;
for (li = l->lv_first; li != NULL && !got_int; li = li->li_next) {
nr++;
const char *fname = tv_get_string(&li->li_tv);
@@ -6234,8 +6240,8 @@ void ex_oldfiles(exarg_T *eap)
}
}
- /* Assume "got_int" was set to truncate the listing. */
- got_int = FALSE;
+ // Assume "got_int" was set to truncate the listing.
+ got_int = false;
// File selection prompt on ":browse oldfiles"
if (cmdmod.browse) {
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index e844c89516..72b2e0f29b 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -2577,29 +2577,29 @@ static struct cmdmod {
int minlen;
int has_count; /* :123verbose :3tab */
} cmdmods[] = {
- {"aboveleft", 3, FALSE},
- {"belowright", 3, FALSE},
- {"botright", 2, FALSE},
- {"browse", 3, FALSE},
- {"confirm", 4, FALSE},
- {"filter", 4, FALSE},
- {"hide", 3, FALSE},
- {"keepalt", 5, FALSE},
- {"keepjumps", 5, FALSE},
- {"keepmarks", 3, FALSE},
- {"keeppatterns", 5, FALSE},
- {"leftabove", 5, FALSE},
- {"lockmarks", 3, FALSE},
- {"noautocmd", 3, FALSE},
- {"noswapfile", 3, FALSE},
- {"rightbelow", 6, FALSE},
- {"sandbox", 3, FALSE},
- {"silent", 3, FALSE},
- {"tab", 3, TRUE},
- {"topleft", 2, FALSE},
- {"unsilent", 3, FALSE},
- {"verbose", 4, TRUE},
- {"vertical", 4, FALSE},
+ { "aboveleft", 3, false },
+ { "belowright", 3, false },
+ { "botright", 2, false },
+ { "browse", 3, false },
+ { "confirm", 4, false },
+ { "filter", 4, false },
+ { "hide", 3, false },
+ { "keepalt", 5, false },
+ { "keepjumps", 5, false },
+ { "keepmarks", 3, false },
+ { "keeppatterns", 5, false },
+ { "leftabove", 5, false },
+ { "lockmarks", 3, false },
+ { "noautocmd", 3, false },
+ { "noswapfile", 3, false },
+ { "rightbelow", 6, false },
+ { "sandbox", 3, false },
+ { "silent", 3, false },
+ { "tab", 3, true },
+ { "topleft", 2, false },
+ { "unsilent", 3, false },
+ { "verbose", 4, true },
+ { "vertical", 4, false },
};
/*