mirror of
https://github.com/neovim/neovim.git
synced 2025-09-20 02:08:17 +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:
@@ -192,7 +192,7 @@ String buffer_get_line(Buffer buffer, Integer index, Error *err)
|
||||
String rv = { .size = 0 };
|
||||
|
||||
index = convert_index(index);
|
||||
Array slice = nvim_buf_get_lines(0, buffer, index, index+1, true, err);
|
||||
Array slice = nvim_buf_get_lines(0, buffer, index, index + 1, true, err);
|
||||
|
||||
if (!ERROR_SET(err) && slice.size) {
|
||||
rv = slice.items[0].data.string;
|
||||
@@ -221,7 +221,7 @@ void buffer_set_line(Buffer buffer, Integer index, String line, Error *err)
|
||||
Object l = STRING_OBJ(line);
|
||||
Array array = { .items = &l, .size = 1 };
|
||||
index = convert_index(index);
|
||||
nvim_buf_set_lines(0, buffer, index, index+1, true, array, err);
|
||||
nvim_buf_set_lines(0, buffer, index, index + 1, true, array, err);
|
||||
}
|
||||
|
||||
/// Deletes a buffer line
|
||||
@@ -239,7 +239,7 @@ void buffer_del_line(Buffer buffer, Integer index, Error *err)
|
||||
{
|
||||
Array array = ARRAY_DICT_INIT;
|
||||
index = convert_index(index);
|
||||
nvim_buf_set_lines(0, buffer, index, index+1, true, array, err);
|
||||
nvim_buf_set_lines(0, buffer, index, index + 1, true, array, err);
|
||||
}
|
||||
|
||||
/// Retrieves a line range from the buffer
|
||||
|
Reference in New Issue
Block a user