mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 05:58:33 +00:00
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.
This commit is contained in:
@@ -450,7 +450,7 @@ static int nlua_wait(lua_State *lstate)
|
||||
}
|
||||
|
||||
MultiQueue *loop_events = fast_only || in_fast_callback > 0
|
||||
? main_loop.fast_events : main_loop.events;
|
||||
? main_loop.fast_events : main_loop.events;
|
||||
|
||||
TimeWatcher *tw = xmalloc(sizeof(TimeWatcher));
|
||||
|
||||
@@ -474,8 +474,8 @@ static int nlua_wait(lua_State *lstate)
|
||||
(int)timeout,
|
||||
got_int || (is_function ? nlua_wait_condition(lstate,
|
||||
&pcall_status,
|
||||
&callback_result) :
|
||||
false));
|
||||
&callback_result)
|
||||
: false));
|
||||
|
||||
// Stop dummy timer
|
||||
time_watcher_stop(tw);
|
||||
|
@@ -65,11 +65,11 @@ int nlua_spell_check(lua_State *lstate)
|
||||
lua_pushlstring(lstate, str, len);
|
||||
lua_rawseti(lstate, -2, 1);
|
||||
|
||||
result = attr == HLF_SPB ? "bad" :
|
||||
attr == HLF_SPR ? "rare" :
|
||||
attr == HLF_SPL ? "local" :
|
||||
attr == HLF_SPC ? "caps" :
|
||||
NULL;
|
||||
result = attr == HLF_SPB
|
||||
? "bad" : (attr == HLF_SPR
|
||||
? "rare" : (attr == HLF_SPL
|
||||
? "local" : (attr == HLF_SPC
|
||||
? "caps" : NULL)));
|
||||
|
||||
assert(result != NULL);
|
||||
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user