mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 11:58:17 +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:
@@ -1301,9 +1301,9 @@ void nvim_subscribe(uint64_t channel_id, String event)
|
||||
void nvim_unsubscribe(uint64_t channel_id, String event)
|
||||
FUNC_API_SINCE(1) FUNC_API_REMOTE_ONLY
|
||||
{
|
||||
size_t length = (event.size < METHOD_MAXLEN ?
|
||||
event.size :
|
||||
METHOD_MAXLEN);
|
||||
size_t length = (event.size < METHOD_MAXLEN
|
||||
? event.size
|
||||
: METHOD_MAXLEN);
|
||||
char e[METHOD_MAXLEN + 1];
|
||||
memcpy(e, event.data, length);
|
||||
e[length] = NUL;
|
||||
@@ -2235,8 +2235,9 @@ Dictionary nvim_eval_statusline(String str, Dict(eval_statusline) *opts, Error *
|
||||
maxwidth = (int)opts->maxwidth;
|
||||
} else {
|
||||
maxwidth = statuscol_lnum ? win_col_off(wp)
|
||||
: (opts->use_tabline
|
||||
|| (!opts->use_winbar && global_stl_height() > 0)) ? Columns : wp->w_width;
|
||||
: (opts->use_tabline
|
||||
|| (!opts->use_winbar
|
||||
&& global_stl_height() > 0)) ? Columns : wp->w_width;
|
||||
}
|
||||
|
||||
char buf[MAXPATHL];
|
||||
|
Reference in New Issue
Block a user