diff options
author | dundargoc <gocdundar@gmail.com> | 2023-11-16 10:59:11 +0100 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-11-20 19:57:09 +0100 |
commit | a6e3d93421ba13c407a96fac9cc01fa41ec7ad98 (patch) | |
tree | e84209969b11fe2f0dabcad00a271468b2199bc9 /src/nvim/api/vim.c | |
parent | ec79ff893d5906e1f0d90953cffa535ffae47823 (diff) | |
download | rneovim-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/api/vim.c')
-rw-r--r-- | src/nvim/api/vim.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c index 88cbdbe1de..27b48c0b28 100644 --- a/src/nvim/api/vim.c +++ b/src/nvim/api/vim.c @@ -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]; |