diff options
author | Dundar Goc <gocdundar@gmail.com> | 2022-04-29 13:53:42 +0200 |
---|---|---|
committer | Dundar Goc <gocdundar@gmail.com> | 2022-04-29 14:13:06 +0200 |
commit | eef8de4df0247157e57f306062b1b86e01a41454 (patch) | |
tree | 949a172d60f0f58e04f99e18db038c435a909825 /src/nvim/buffer.c | |
parent | 0b3ae64480ea28bb57783c2269a61f0a60ffc55e (diff) | |
download | rneovim-eef8de4df0247157e57f306062b1b86e01a41454.tar.gz rneovim-eef8de4df0247157e57f306062b1b86e01a41454.tar.bz2 rneovim-eef8de4df0247157e57f306062b1b86e01a41454.zip |
refactor(uncrustify): change rules to better align with the style guide
Add space around arithmetic operators '+' and '-'.
Remove space between back-to-back parentheses, i.e. ')(' vs. ') ('.
Remove space between '((' or '))' of control statements.
Add space between ')' and '{' of control statements.
Remove space between function name and '(' on function declaration.
Collapse empty blocks between '{' and '}'.
Remove newline at the end of the file.
Remove newline between 'enum' and '{'.
Remove newline between '}' and ')' in a function invocation.
Remove newline between '}' and 'while' of 'do' statement.
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 99a24464a8..5786a73f43 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -2343,9 +2343,9 @@ int ExpandBufnames(char_u *pat, int *num_file, char_u ***file, int options) // if the current buffer is first in the list, place it at the end if (matches[0].buf == curbuf) { for (int i = 1; i < count; i++) { - (*file)[i-1] = matches[i].match; + (*file)[i - 1] = matches[i].match; } - (*file)[count-1] = matches[0].match; + (*file)[count - 1] = matches[0].match; } else { for (int i = 0; i < count; i++) { (*file)[i] = matches[i].match; @@ -5410,8 +5410,8 @@ static int buf_signcols_inner(buf_T *buf, int maximum) if (sign->se_lnum > curline) { // Counted all signs, now add extmark signs if (curline > 0) { - linesum += decor_signcols(buf, &decor_state, (int)curline-1, (int)curline-1, - maximum-linesum); + linesum += decor_signcols(buf, &decor_state, (int)curline - 1, (int)curline - 1, + maximum - linesum); } curline = sign->se_lnum; if (linesum > signcols) { @@ -5429,7 +5429,8 @@ static int buf_signcols_inner(buf_T *buf, int maximum) } if (curline > 0) { - linesum += decor_signcols(buf, &decor_state, (int)curline-1, (int)curline-1, maximum-linesum); + linesum += decor_signcols(buf, &decor_state, (int)curline - 1, (int)curline - 1, + maximum - linesum); } if (linesum > signcols) { signcols = linesum; @@ -5439,7 +5440,7 @@ static int buf_signcols_inner(buf_T *buf, int maximum) } // Check extmarks between signs - linesum = decor_signcols(buf, &decor_state, 0, (int)buf->b_ml.ml_line_count-1, maximum); + linesum = decor_signcols(buf, &decor_state, 0, (int)buf->b_ml.ml_line_count - 1, maximum); if (linesum > signcols) { signcols = linesum; @@ -5511,8 +5512,8 @@ void buf_signcols_add_check(buf_T *buf, sign_entry_T *added) for (; s->se_next && s->se_lnum == s->se_next->se_lnum; s = s->se_next) { linesum++; } - linesum += decor_signcols(buf, &decor_state, (int)s->se_lnum-1, (int)s->se_lnum-1, - SIGN_SHOW_MAX-linesum); + linesum += decor_signcols(buf, &decor_state, (int)s->se_lnum - 1, (int)s->se_lnum - 1, + SIGN_SHOW_MAX - linesum); if (linesum > buf->b_signcols.size) { buf->b_signcols.size = linesum; |