mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 00:08:19 +00:00
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.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user