aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/tag.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-05-01 17:30:38 -0400
committerJustin M. Keyes <justinkz@gmail.com>2016-05-01 17:30:38 -0400
commitd542de4a76dd9e600ebcf1405efdc9d3090ad9a8 (patch)
tree60b1d2aad6205c74b7c2611fbbed45759a302f4f /src/nvim/tag.c
parent91afb30b667bbc321d351708f694d00b256be585 (diff)
parentcf4e1fb0f4962319eee292248d9c1f73be3a8d0c (diff)
downloadrneovim-d542de4a76dd9e600ebcf1405efdc9d3090ad9a8.tar.gz
rneovim-d542de4a76dd9e600ebcf1405efdc9d3090ad9a8.tar.bz2
rneovim-d542de4a76dd9e600ebcf1405efdc9d3090ad9a8.zip
Merge pull request #4688 from ZyX-I/clint-checks
Add check for boolean operators placement
Diffstat (limited to 'src/nvim/tag.c')
-rw-r--r--src/nvim/tag.c41
1 files changed, 17 insertions, 24 deletions
diff --git a/src/nvim/tag.c b/src/nvim/tag.c
index da84106454..7885d467d8 100644
--- a/src/nvim/tag.c
+++ b/src/nvim/tag.c
@@ -526,19 +526,17 @@ do_tag (
taglen_advance(taglen);
MSG_PUTS_ATTR(_("file\n"), hl_attr(HLF_T));
- for (i = 0; i < num_matches && !got_int; ++i) {
+ for (i = 0; i < num_matches && !got_int; i++) {
parse_match(matches[i], &tagp);
- if (!new_tag && (
- (g_do_tagpreview != 0
- && i == ptag_entry.cur_match) ||
- (use_tagstack
- && i == tagstack[tagstackidx].cur_match)))
+ if (!new_tag && ((g_do_tagpreview != 0 && i == ptag_entry.cur_match)
+ || (use_tagstack
+ && i == tagstack[tagstackidx].cur_match))) {
*IObuff = '>';
- else
+ } else {
*IObuff = ' ';
- vim_snprintf((char *)IObuff + 1, IOSIZE - 1,
- "%2d %s ", i + 1,
- mt_names[matches[i][0] & MT_MASK]);
+ }
+ vim_snprintf((char *)IObuff + 1, IOSIZE - 1, "%2d %s ", i + 1,
+ mt_names[matches[i][0] & MT_MASK]);
msg_puts(IObuff);
if (tagp.tagkind != NULL)
msg_outtrans_len(tagp.tagkind,
@@ -1226,20 +1224,15 @@ find_tags (
for (round = 1; round <= 2; ++round) {
linear = (orgpat.headlen == 0 || !p_tbs || round == 2);
- /*
- * Try tag file names from tags option one by one.
- */
- for (first_file = TRUE;
- use_cscope ||
- get_tagfname(&tn, first_file, tag_fname) == OK;
- first_file = FALSE) {
- /*
- * A file that doesn't exist is silently ignored. Only when not a
- * single file is found, an error message is given (further on).
- */
- if (use_cscope)
- fp = NULL; /* avoid GCC warning */
- else {
+ // Try tag file names from tags option one by one.
+ for (first_file = true;
+ use_cscope || get_tagfname(&tn, first_file, tag_fname) == OK;
+ first_file = false) {
+ // A file that doesn't exist is silently ignored. Only when not a
+ // single file is found, an error message is given (further on).
+ if (use_cscope) {
+ fp = NULL; // avoid GCC warning
+ } else {
if (curbuf->b_help) {
/* Prefer help tags according to 'helplang'. Put the
* two-letter language name in help_lang[]. */