aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/if_cscope.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-05-26 20:59:28 +0200
committerGitHub <noreply@github.com>2019-05-26 20:59:28 +0200
commit1ca84897a0d65b0afbb2141f12a2061dabeb6b09 (patch)
tree01e8232cc8d79cf7dc03d66459d4d0bcaa4b077c /src/nvim/if_cscope.c
parent0bbaef8a99af8733cc64ff29858e17c19ed30b3c (diff)
parent80f40f0203f5af167f8c77bf6b9f22a4d1abd6da (diff)
downloadrneovim-1ca84897a0d65b0afbb2141f12a2061dabeb6b09.tar.gz
rneovim-1ca84897a0d65b0afbb2141f12a2061dabeb6b09.tar.bz2
rneovim-1ca84897a0d65b0afbb2141f12a2061dabeb6b09.zip
Merge #10059 from jerdna-regeiz/vim-8.1.0614
vim-patch:8.1.0614,8.1.0632,8.1.0644,8.1.0658,8.1.0660,8.1.0669,8.1.0673,8.1.0679,8.1.0697,8.1.0701,8.1.0702,8.1.0709,8.1.0717,8.1.0750,8.1.0767,8.1.0772,8.1.0039
Diffstat (limited to 'src/nvim/if_cscope.c')
-rw-r--r--src/nvim/if_cscope.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/nvim/if_cscope.c b/src/nvim/if_cscope.c
index 84721ee96c..a3eabed8a0 100644
--- a/src/nvim/if_cscope.c
+++ b/src/nvim/if_cscope.c
@@ -1524,12 +1524,10 @@ static void cs_fill_results(char *tagstr, size_t totmatches, int *nummatches_a,
}
totsofar++;
-
- } /* for all matches */
+ } // for all matches
(void)cs_read_prompt(i);
-
- } /* for all cscope connections */
+ } // for all cscope connections
if (totsofar == 0) {
// No matches, free the arrays and return NULL in "*matches_p".
@@ -1541,20 +1539,25 @@ static void cs_fill_results(char *tagstr, size_t totmatches, int *nummatches_a,
*cntxts_p = cntxts;
xfree(buf);
-} /* cs_fill_results */
+} // cs_fill_results
/* get the requested path components */
static char *cs_pathcomponents(char *path)
{
- if (p_cspc == 0)
+ if (p_cspc == 0) {
return path;
+ }
char *s = path + strlen(path) - 1;
- for (int i = 0; i < p_cspc; ++i)
- while (s > path && *--s != '/') continue;
- if ((s > path && *s == '/'))
- ++s;
+ for (int i = 0; i < p_cspc; i++) {
+ while (s > path && *--s != '/') {
+ continue;
+ }
+ }
+ if ((s > path && *s == '/')) {
+ s++;
+ }
return s;
}