aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/extmark.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/extmark.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/extmark.c')
-rw-r--r--src/nvim/extmark.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/extmark.c b/src/nvim/extmark.c
index a3fcc7d784..ffd68926f1 100644
--- a/src/nvim/extmark.c
+++ b/src/nvim/extmark.c
@@ -512,7 +512,7 @@ void extmark_adjust(buf_T *buf, linenr_T line1, linenr_T line2, long amount, lon
bcount_t old_byte = 0, new_byte = 0;
int old_row, new_row;
if (amount == MAXLNUM) {
- old_row = (int)(line2 - line1+1);
+ old_row = (int)(line2 - line1 + 1);
// TODO(bfredl): ej kasta?
old_byte = (bcount_t)buf->deleted_bytes2;
@@ -526,11 +526,11 @@ void extmark_adjust(buf_T *buf, linenr_T line1, linenr_T line2, long amount, lon
new_row = (int)amount;
}
if (new_row > 0) {
- new_byte = ml_find_line_or_offset(buf, line1+new_row, NULL, true)
+ new_byte = ml_find_line_or_offset(buf, line1 + new_row, NULL, true)
- start_byte;
}
extmark_splice_impl(buf,
- (int)line1-1, 0, start_byte,
+ (int)line1 - 1, 0, start_byte,
old_row, 0, old_byte,
new_row, 0, new_byte, undo);
}
@@ -609,18 +609,18 @@ void extmark_splice_impl(buf_T *buf, int start_row, colnr_T start_col, bcount_t
// merge algorithm later.
if (old_row == 0 && new_row == 0 && kv_size(uhp->uh_extmark)) {
ExtmarkUndoObject *item = &kv_A(uhp->uh_extmark,
- kv_size(uhp->uh_extmark)-1);
+ kv_size(uhp->uh_extmark) - 1);
if (item->type == kExtmarkSplice) {
ExtmarkSplice *splice = &item->data.splice;
if (splice->start_row == start_row && splice->old_row == 0
&& splice->new_row == 0) {
if (old_col == 0 && start_col >= splice->start_col
- && start_col <= splice->start_col+splice->new_col) {
+ && start_col <= splice->start_col + splice->new_col) {
splice->new_col += new_col;
splice->new_byte += new_byte;
merged = true;
} else if (new_col == 0
- && start_col == splice->start_col+splice->new_col) {
+ && start_col == splice->start_col + splice->new_col) {
splice->old_col += old_col;
splice->old_byte += old_byte;
merged = true;