aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/extmark.c
diff options
context:
space:
mode:
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;