aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/tag.c
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2023-11-16 10:59:11 +0100
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2023-11-20 19:57:09 +0100
commita6e3d93421ba13c407a96fac9cc01fa41ec7ad98 (patch)
treee84209969b11fe2f0dabcad00a271468b2199bc9 /src/nvim/tag.c
parentec79ff893d5906e1f0d90953cffa535ffae47823 (diff)
downloadrneovim-a6e3d93421ba13c407a96fac9cc01fa41ec7ad98.tar.gz
rneovim-a6e3d93421ba13c407a96fac9cc01fa41ec7ad98.tar.bz2
rneovim-a6e3d93421ba13c407a96fac9cc01fa41ec7ad98.zip
refactor: enable formatting for ternaries
This requires removing the "Inner expression should be aligned" rule from clint as it prevents essentially any formatting regarding ternary operators.
Diffstat (limited to 'src/nvim/tag.c')
-rw-r--r--src/nvim/tag.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/nvim/tag.c b/src/nvim/tag.c
index a3ef7f31b6..23443996b0 100644
--- a/src/nvim/tag.c
+++ b/src/nvim/tag.c
@@ -390,8 +390,8 @@ void do_tag(char *tag, int type, int count, int forceit, int verbose)
new_tag = true;
} else {
- if (g_do_tagpreview != 0 ? ptag_entry.tagname == NULL :
- tagstacklen == 0) {
+ if (g_do_tagpreview != 0 ? ptag_entry.tagname == NULL
+ : tagstacklen == 0) {
// empty stack
emsg(_(e_tag_stack_empty));
goto end_do_tag;
@@ -2307,11 +2307,12 @@ int find_tags(char *pat, int *num_matches, char ***matchesp, int flags, int minc
int verbose = (flags & TAG_VERBOSE);
int save_p_ic = p_ic;
+ // uncrustify:off
+
// Change the value of 'ignorecase' according to 'tagcase' for the
// duration of this function.
switch (curbuf->b_tc_flags ? curbuf->b_tc_flags : tc_flags) {
- case TC_FOLLOWIC:
- break;
+ case TC_FOLLOWIC: break;
case TC_IGNORE:
p_ic = true;
break;
@@ -2328,6 +2329,8 @@ int find_tags(char *pat, int *num_matches, char ***matchesp, int flags, int minc
abort();
}
+ // uncrustify:on
+
int help_save = curbuf->b_help;
findtags_state_init(&st, pat, flags, mincount);
@@ -3208,7 +3211,7 @@ int expand_tags(int tagnames, char *pat, int *num_file, char ***file)
memmove(name_buf, t_p.tagname, len);
name_buf[len++] = 0;
name_buf[len++] = (t_p.tagkind != NULL && *t_p.tagkind)
- ? *t_p.tagkind : 'f';
+ ? *t_p.tagkind : 'f';
name_buf[len++] = 0;
memmove((*file)[i] + len, t_p.fname, (size_t)(t_p.fname_end - t_p.fname));
(*file)[i][len + (size_t)(t_p.fname_end - t_p.fname)] = 0;