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/mapping.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/mapping.c')
-rw-r--r-- | src/nvim/mapping.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/mapping.c b/src/nvim/mapping.c index 77fdd02a14..a758bd16bd 100644 --- a/src/nvim/mapping.c +++ b/src/nvim/mapping.c @@ -579,8 +579,8 @@ static int buf_do_map(int maptype, MapArguments *args, int mode, bool is_abbrev, mapblock_T **abbr_table = args->buffer ? &buf->b_first_abbr : &first_abbr; // For ":noremap" don't remap, otherwise do remap. - int noremap = args->script ? REMAP_SCRIPT : - maptype == MAPTYPE_NOREMAP ? REMAP_NONE : REMAP_YES; + int noremap = args->script ? REMAP_SCRIPT + : maptype == MAPTYPE_NOREMAP ? REMAP_NONE : REMAP_YES; const bool has_lhs = (args->lhs[0] != NUL); const bool has_rhs = args->rhs_lua != LUA_NOREF || (args->rhs[0] != NUL) || args->rhs_is_noop; @@ -1521,8 +1521,8 @@ bool check_abbr(int c, char *ptr, int col, int mincol) mp2 = NULL; } for (; mp; - mp->m_next == NULL ? (mp = mp2, mp2 = NULL) : - (mp = mp->m_next)) { + mp->m_next == NULL ? (mp = mp2, mp2 = NULL) + : (mp = mp->m_next)) { int qlen = mp->m_keylen; char *q = mp->m_keys; int match; @@ -2621,7 +2621,7 @@ static void do_exmap(exarg_T *eap, int isabbrev) int mode = get_map_mode(&cmdp, eap->forceit || isabbrev); switch (do_map((*cmdp == 'n') ? MAPTYPE_NOREMAP - : (*cmdp == 'u') ? MAPTYPE_UNMAP : MAPTYPE_MAP, + : (*cmdp == 'u') ? MAPTYPE_UNMAP : MAPTYPE_MAP, eap->arg, mode, isabbrev)) { case 1: emsg(_(e_invarg)); |