aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.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.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.c')
-rw-r--r--src/nvim/eval.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index c073f30547..a4b6a5fc11 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -2439,7 +2439,7 @@ int eval1(char **arg, typval_T *rettv, evalarg_T *const evalarg)
}
*arg = skipwhite(*arg + 1);
evalarg_used->eval_flags = (op_falsy ? !result : result)
- ? orig_flags : (orig_flags & ~EVAL_EVALUATE);
+ ? orig_flags : (orig_flags & ~EVAL_EVALUATE);
typval_T var2;
if (eval1(arg, &var2, evalarg_used) == FAIL) {
evalarg_used->eval_flags = orig_flags;
@@ -7352,7 +7352,7 @@ char *set_cmdarg(exarg_T *eap, char *oldarg)
newval_len - xlen,
" ++ff=%s",
eap->force_ff == 'u' ? "unix"
- : eap->force_ff == 'd' ? "dos" : "mac");
+ : eap->force_ff == 'd' ? "dos" : "mac");
if (rc < 0) {
goto error;
}
@@ -8086,10 +8086,10 @@ void ex_execute(exarg_T *eap)
if (!eap->skip) {
const char *const argstr = eap->cmdidx == CMD_execute
- ? tv_get_string(&rettv)
- : rettv.v_type == VAR_STRING
- ? encode_tv2echo(&rettv, NULL)
- : encode_tv2string(&rettv, NULL);
+ ? tv_get_string(&rettv)
+ : rettv.v_type == VAR_STRING
+ ? encode_tv2echo(&rettv, NULL)
+ : encode_tv2string(&rettv, NULL);
const size_t len = strlen(argstr);
ga_grow(&ga, (int)len + 2);
if (!GA_EMPTY(&ga)) {
@@ -8879,8 +8879,8 @@ bool eval_has_provider(const char *feat)
}
bool ok = (tv.v_type == VAR_NUMBER)
- ? 2 == tv.vval.v_number // Value of 2 means "loaded and working".
- : false;
+ ? 2 == tv.vval.v_number // Value of 2 means "loaded and working".
+ : false;
if (ok) {
// Call() must be defined if provider claims to be working.