aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/xdiff.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/lua/xdiff.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/lua/xdiff.c')
-rw-r--r--src/nvim/lua/xdiff.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/lua/xdiff.c b/src/nvim/lua/xdiff.c
index 29e3bbefd0..bf52ae4232 100644
--- a/src/nvim/lua/xdiff.c
+++ b/src/nvim/lua/xdiff.c
@@ -192,11 +192,11 @@ static bool check_xdiff_opt(ObjectType actType, ObjectType expType, const char *
{
if (actType != expType) {
const char *type_str =
- expType == kObjectTypeString ? "string" :
- expType == kObjectTypeInteger ? "integer" :
- expType == kObjectTypeBoolean ? "boolean" :
- expType == kObjectTypeLuaRef ? "function" :
- "NA";
+ expType == kObjectTypeString
+ ? "string" : (expType == kObjectTypeInteger
+ ? "integer" : (expType == kObjectTypeBoolean
+ ? "boolean" : (expType == kObjectTypeLuaRef
+ ? "function" : "NA")));
api_set_error(err, kErrorTypeValidation, "%s is not a %s", name,
type_str);