aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/memline.c
diff options
context:
space:
mode:
authorDundar Goc <gocdundar@gmail.com>2022-04-29 13:53:42 +0200
committerDundar Goc <gocdundar@gmail.com>2022-04-29 14:13:06 +0200
commiteef8de4df0247157e57f306062b1b86e01a41454 (patch)
tree949a172d60f0f58e04f99e18db038c435a909825 /src/nvim/memline.c
parent0b3ae64480ea28bb57783c2269a61f0a60ffc55e (diff)
downloadrneovim-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/memline.c')
-rw-r--r--src/nvim/memline.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/nvim/memline.c b/src/nvim/memline.c
index 5c2f494450..ce6c702276 100644
--- a/src/nvim/memline.c
+++ b/src/nvim/memline.c
@@ -972,8 +972,7 @@ void ml_recover(bool checkext)
if (b0p->b0_flags & B0_HAS_FENC) {
int fnsize = B0_FNAME_SIZE_NOCRYPT;
- for (p = b0p->b0_fname + fnsize; p > b0p->b0_fname && p[-1] != NUL; p--) {
- }
+ for (p = b0p->b0_fname + fnsize; p > b0p->b0_fname && p[-1] != NUL; p--) {}
b0_fenc = vim_strnsave(p, b0p->b0_fname + fnsize - p);
}
@@ -2438,8 +2437,8 @@ void ml_add_deleted_len_buf(buf_T *buf, char_u *ptr, ssize_t len)
if (len == -1) {
len = STRLEN(ptr);
}
- curbuf->deleted_bytes += len+1;
- curbuf->deleted_bytes2 += len+1;
+ curbuf->deleted_bytes += len + 1;
+ curbuf->deleted_bytes2 += len + 1;
if (curbuf->update_need_codepoints) {
mb_utflen(ptr, len, &curbuf->deleted_codepoints,
&curbuf->deleted_codeunits);
@@ -2585,7 +2584,7 @@ static int ml_delete_int(buf_T *buf, linenr_T lnum, bool message)
// Line should always have an NL char internally (represented as NUL),
// even if 'noeol' is set.
assert(line_size >= 1);
- ml_add_deleted_len_buf(buf, (char_u *)dp + line_start, line_size-1);
+ ml_add_deleted_len_buf(buf, (char_u *)dp + line_start, line_size - 1);
/*
* special case: If there is only one line in the data block it becomes empty.