aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/move.c
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2023-11-16 10:59:11 +0100
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2023-11-20 19:57:09 +0100
commita6e3d93421ba13c407a96fac9cc01fa41ec7ad98 (patch)
treee84209969b11fe2f0dabcad00a271468b2199bc9 /src/nvim/move.c
parentec79ff893d5906e1f0d90953cffa535ffae47823 (diff)
downloadrneovim-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/move.c')
-rw-r--r--src/nvim/move.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/move.c b/src/nvim/move.c
index ee6c6101b2..a719386084 100644
--- a/src/nvim/move.c
+++ b/src/nvim/move.c
@@ -757,8 +757,8 @@ void validate_cursor_col(void)
// fold column and sign column (these don't move when scrolling horizontally).
int win_col_off(win_T *wp)
{
- return ((wp->w_p_nu || wp->w_p_rnu || *wp->w_p_stc != NUL) ?
- (number_width(wp) + (*wp->w_p_stc == NUL)) : 0)
+ return ((wp->w_p_nu || wp->w_p_rnu || *wp->w_p_stc != NUL)
+ ? (number_width(wp) + (*wp->w_p_stc == NUL)) : 0)
+ ((cmdwin_type == 0 || wp != curwin) ? 0 : 1)
+ win_fdccol_count(wp) + (win_signcol_count(wp) * SIGN_WIDTH);
}