aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.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/buffer.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/buffer.c')
-rw-r--r--src/nvim/buffer.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index deec0662a1..1e27d2e57c 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -423,8 +423,8 @@ bool bufref_valid(bufref_T *bufref)
FUNC_ATTR_PURE
{
return bufref->br_buf_free_count == buf_free_count
- ? true
- : buf_valid(bufref->br_buf) && bufref->br_fnum == bufref->br_buf->b_fnum;
+ ? true
+ : buf_valid(bufref->br_buf) && bufref->br_fnum == bufref->br_buf->b_fnum;
}
/// Check that "buf" points to a valid buffer in the buffer list.
@@ -2777,7 +2777,7 @@ void buflist_list(exarg_T *eap)
for (;
buf != NULL && !got_int;
buf = buflist_data != NULL
- ? (++p < buflist_data + buflist.ga_len ? *p : NULL) : buf->b_next) {
+ ? (++p < buflist_data + buflist.ga_len ? *p : NULL) : buf->b_next) {
const bool is_terminal = buf->terminal;
const bool job_running = buf->terminal && terminal_running(buf->terminal);
@@ -2811,8 +2811,8 @@ void buflist_list(exarg_T *eap)
}
const int changed_char = (buf->b_flags & BF_READERR)
- ? 'x'
- : (bufIsChanged(buf) ? '+' : ' ');
+ ? 'x'
+ : (bufIsChanged(buf) ? '+' : ' ');
int ro_char = !MODIFIABLE(buf) ? '-' : (buf->b_p_ro ? '=' : ' ');
if (buf->terminal) {
ro_char = channel_job_running((uint64_t)buf->b_p_channel) ? 'R' : 'F';
@@ -3592,8 +3592,8 @@ void ex_buffer_all(exarg_T *eap)
// Try to close floating windows first
for (wp = lastwin->w_floating ? lastwin : firstwin; wp != NULL; wp = wpnext) {
wpnext = wp->w_floating
- ? wp->w_prev->w_floating ? wp->w_prev : firstwin
- : (wp->w_next == NULL || wp->w_next->w_floating) ? NULL : wp->w_next;
+ ? wp->w_prev->w_floating ? wp->w_prev : firstwin
+ : (wp->w_next == NULL || wp->w_next->w_floating) ? NULL : wp->w_next;
if ((wp->w_buffer->b_nwindows > 1
|| wp->w_floating
|| ((cmdmod.cmod_split & WSP_VERT)