aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Vigouroux <tomvig38@gmail.com>2020-06-29 18:34:45 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2020-09-09 21:22:21 +0200
commit82fb6a881805658359777ab172f91d1a84b91b8d (patch)
tree436f30c3eec409827c4f27cfa4994d6786fe73e4 /src
parent9437327d5ee627ddb15bfbc88112bd77e4e3ffcf (diff)
downloadrneovim-82fb6a881805658359777ab172f91d1a84b91b8d.tar.gz
rneovim-82fb6a881805658359777ab172f91d1a84b91b8d.tar.bz2
rneovim-82fb6a881805658359777ab172f91d1a84b91b8d.zip
fix lints
Diffstat (limited to 'src')
-rw-r--r--src/nvim/buffer_updates.c9
-rw-r--r--src/nvim/change.c2
-rw-r--r--src/nvim/extmark.c24
-rw-r--r--src/nvim/indent.c8
-rw-r--r--src/nvim/memline.c20
5 files changed, 34 insertions, 29 deletions
diff --git a/src/nvim/buffer_updates.c b/src/nvim/buffer_updates.c
index 1e7cc8520f..79483380c9 100644
--- a/src/nvim/buffer_updates.c
+++ b/src/nvim/buffer_updates.c
@@ -282,10 +282,11 @@ void buf_updates_send_changes(buf_T *buf,
kv_size(buf->update_callbacks) = j;
}
-void buf_updates_send_splice(buf_T *buf,
- int start_row, colnr_T start_col, bcount_t start_byte,
- int old_row, colnr_T old_col, bcount_t old_byte,
- int new_row, colnr_T new_col, bcount_t new_byte)
+void buf_updates_send_splice(
+ buf_T *buf,
+ int start_row, colnr_T start_col, bcount_t start_byte,
+ int old_row, colnr_T old_col, bcount_t old_byte,
+ int new_row, colnr_T new_col, bcount_t new_byte)
{
if (!buf_updates_active(buf)) {
return;
diff --git a/src/nvim/change.c b/src/nvim/change.c
index 6ffc26332a..5e1ec616f6 100644
--- a/src/nvim/change.c
+++ b/src/nvim/change.c
@@ -1611,7 +1611,7 @@ int open_line(
}
ml_replace(curwin->w_cursor.lnum, p_extra, true);
changed_bytes(curwin->w_cursor.lnum, 0);
- // TODO: extmark_splice_cols here??
+ // TODO(vigoux): extmark_splice_cols here??
curwin->w_cursor.lnum--;
did_append = false;
}
diff --git a/src/nvim/extmark.c b/src/nvim/extmark.c
index bb981cb2f6..3a04908ccb 100644
--- a/src/nvim/extmark.c
+++ b/src/nvim/extmark.c
@@ -540,7 +540,7 @@ void extmark_adjust(buf_T *buf,
int old_row, new_row;
if (amount == MAXLNUM) {
old_row = (int)(line2 - line1+1);
- // TODO: ej kasta?
+ // TODO(bfredl): ej kasta?
old_byte = (bcount_t)buf->deleted_bytes2;
new_row = (int)(amount_after + old_row);
@@ -553,7 +553,8 @@ void extmark_adjust(buf_T *buf,
new_row = (int)amount;
}
if (new_row > 0) {
- new_byte = ml_find_line_or_offset(buf, line1+new_row, NULL, true)-start_byte;
+ 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,
@@ -562,10 +563,10 @@ void extmark_adjust(buf_T *buf,
}
void extmark_splice(buf_T *buf,
- int start_row, colnr_T start_col,
- int old_row, colnr_T old_col, bcount_t old_byte,
- int new_row, colnr_T new_col, bcount_t new_byte,
- ExtmarkOp undo)
+ int start_row, colnr_T start_col,
+ int old_row, colnr_T old_col, bcount_t old_byte,
+ int new_row, colnr_T new_col, bcount_t new_byte,
+ ExtmarkOp undo)
{
long offset = ml_find_line_or_offset(buf, start_row+1, NULL, true);
extmark_splice_impl(buf, start_row, start_col, offset+start_col,
@@ -668,11 +669,12 @@ void extmark_splice_cols(buf_T *buf,
0, new_col, new_col, undo);
}
-void extmark_move_region(buf_T *buf,
- int start_row, colnr_T start_col, bcount_t start_byte,
- int extent_row, colnr_T extent_col, bcount_t extent_byte,
- int new_row, colnr_T new_col, bcount_t new_byte,
- ExtmarkOp undo)
+void extmark_move_region(
+ buf_T *buf,
+ int start_row, colnr_T start_col, bcount_t start_byte,
+ int extent_row, colnr_T extent_col, bcount_t extent_byte,
+ int new_row, colnr_T new_col, bcount_t new_byte,
+ ExtmarkOp undo)
{
// TODO(bfredl): this is not synced to the buffer state inside the callback.
// But unless we make the undo implementation smarter, this is not ensured
diff --git a/src/nvim/indent.c b/src/nvim/indent.c
index 25a9b38b5d..bb0fdfec01 100644
--- a/src/nvim/indent.c
+++ b/src/nvim/indent.c
@@ -298,9 +298,11 @@ int set_indent(int size, int flags)
ml_replace(curwin->w_cursor.lnum, newline, false);
if (!(flags & SIN_NOMARK)) {
extmark_splice_cols(curbuf,
- (int)curwin->w_cursor.lnum-1, skipcols,
- (int)(p-oldline) - skipcols, (int)(s-newline) - skipcols,
- kExtmarkUndo);
+ (int)curwin->w_cursor.lnum-1,
+ skipcols,
+ (int)(p-oldline) - skipcols,
+ (int)(s-newline) - skipcols,
+ kExtmarkUndo);
}
if (flags & SIN_CHANGED) {
diff --git a/src/nvim/memline.c b/src/nvim/memline.c
index 9dde4a401b..ebd86a3f7d 100644
--- a/src/nvim/memline.c
+++ b/src/nvim/memline.c
@@ -257,11 +257,11 @@ int ml_open(buf_T *buf)
/*
* init fields in memline struct
*/
- buf->b_ml.ml_stack_size = 0; /* no stack yet */
- buf->b_ml.ml_stack = NULL; /* no stack yet */
- buf->b_ml.ml_stack_top = 0; /* nothing in the stack */
- buf->b_ml.ml_locked = NULL; /* no cached block */
- buf->b_ml.ml_line_lnum = 0; /* no cached line */
+ buf->b_ml.ml_stack_size = 0; // no stack yet
+ buf->b_ml.ml_stack = NULL; // no stack yet
+ buf->b_ml.ml_stack_top = 0; // nothing in the stack
+ buf->b_ml.ml_locked = NULL; // no cached block
+ buf->b_ml.ml_line_lnum = 0; // no cached line
buf->b_ml.ml_line_offset = 0;
buf->b_ml.ml_chunksize = NULL;
@@ -832,12 +832,12 @@ void ml_recover(bool checkext)
/*
* init fields in memline struct
*/
- buf->b_ml.ml_stack_size = 0; /* no stack yet */
- buf->b_ml.ml_stack = NULL; /* no stack yet */
- buf->b_ml.ml_stack_top = 0; /* nothing in the stack */
- buf->b_ml.ml_line_lnum = 0; /* no cached line */
+ buf->b_ml.ml_stack_size = 0; // no stack yet
+ buf->b_ml.ml_stack = NULL; // no stack yet
+ buf->b_ml.ml_stack_top = 0; // nothing in the stack
+ buf->b_ml.ml_line_lnum = 0; // no cached line
buf->b_ml.ml_line_offset = 0;
- buf->b_ml.ml_locked = NULL; /* no locked block */
+ buf->b_ml.ml_locked = NULL; // no locked block
buf->b_ml.ml_flags = 0;
/*