aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/userfunc.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/eval/userfunc.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/eval/userfunc.c')
-rw-r--r--src/nvim/eval/userfunc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/eval/userfunc.c b/src/nvim/eval/userfunc.c
index 822ac4d16a..e15320e391 100644
--- a/src/nvim/eval/userfunc.c
+++ b/src/nvim/eval/userfunc.c
@@ -2446,7 +2446,7 @@ void ex_function(exarg_T *eap)
p = theline;
} else if (is_heredoc) {
p = skipwhite(theline) == theline
- ? theline : theline + strlen(heredoc_trimmed);
+ ? theline : theline + strlen(heredoc_trimmed);
} else {
p = theline + strlen(heredoc_trimmed);
}
@@ -3573,8 +3573,8 @@ void make_partial(dict_T *const selfdict, typval_T *const rettv)
fp = rettv->vval.v_partial->pt_func;
} else {
char *fname = rettv->v_type == VAR_FUNC || rettv->v_type == VAR_STRING
- ? rettv->vval.v_string
- : rettv->vval.v_partial->pt_name;
+ ? rettv->vval.v_string
+ : rettv->vval.v_partial->pt_name;
// Translate "s:func" to the stored function name.
fname = fname_trans_sid(fname, fname_buf, &tofree, &error);
fp = find_func(fname);