mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +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:
@@ -88,9 +88,9 @@ static int validate_option_value_args(Dict(option) *opts, char *name, int *scope
|
||||
int req_flags = *req_scope == kOptReqBuf ? SOPT_BUF : SOPT_WIN;
|
||||
if (!(flags & req_flags)) {
|
||||
char *tgt = *req_scope & kOptReqBuf ? "buf" : "win";
|
||||
char *global = flags & SOPT_GLOBAL ? "global ": "";
|
||||
char *req = flags & SOPT_BUF ? "buffer-local " :
|
||||
flags & SOPT_WIN ? "window-local " : "";
|
||||
char *global = flags & SOPT_GLOBAL ? "global " : "";
|
||||
char *req = flags & SOPT_BUF ? "buffer-local "
|
||||
: flags & SOPT_WIN ? "window-local " : "";
|
||||
|
||||
api_set_error(err, kErrorTypeValidation, "'%s' cannot be passed for %s%soption '%s'",
|
||||
tgt, global, req, name);
|
||||
@@ -495,7 +495,7 @@ OptVal get_option_value_strict(char *name, OptReqScope req_scope, void *from, Er
|
||||
switchwin_T switchwin;
|
||||
aco_save_T aco;
|
||||
void *ctx = req_scope == kOptReqWin ? (void *)&switchwin
|
||||
: (req_scope == kOptReqBuf ? (void *)&aco : NULL);
|
||||
: (req_scope == kOptReqBuf ? (void *)&aco : NULL);
|
||||
bool switched = switch_option_context(ctx, req_scope, from, err);
|
||||
if (ERROR_SET(err)) {
|
||||
return retv;
|
||||
|
Reference in New Issue
Block a user