aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraichoo <raichoo@googlemail.com>2017-03-11 14:41:34 +0100
committerraichoo <raichoo@googlemail.com>2017-03-19 21:14:11 +0100
commit2ad25c04663da7d08da94db84dc6ded7df11ea87 (patch)
tree18db3e71c293d72854c095d723f1ea7f824eaf39
parent86b1e7f5834d58eebc87735c9a531040fea1a0f7 (diff)
downloadrneovim-2ad25c04663da7d08da94db84dc6ded7df11ea87.tar.gz
rneovim-2ad25c04663da7d08da94db84dc6ded7df11ea87.tar.bz2
rneovim-2ad25c04663da7d08da94db84dc6ded7df11ea87.zip
linter: make changes pass the linter
-rw-r--r--src/nvim/cursor.c8
-rw-r--r--src/nvim/move.c3
-rw-r--r--src/nvim/normal.c6
-rw-r--r--src/nvim/ops.c14
4 files changed, 17 insertions, 14 deletions
diff --git a/src/nvim/cursor.c b/src/nvim/cursor.c
index 01476627de..544bcf6ede 100644
--- a/src/nvim/cursor.c
+++ b/src/nvim/cursor.c
@@ -296,7 +296,8 @@ linenr_T get_cursor_rel_lnum(win_T *wp, linenr_T lnum)
// Make sure "pos.lnum" and "pos.col" are valid in "buf".
// This allows for the col to be on the NUL byte.
-void check_pos(buf_T *buf, pos_T *pos) {
+void check_pos(buf_T *buf, pos_T *pos)
+{
char_u *line;
colnr_T len;
@@ -305,10 +306,11 @@ void check_pos(buf_T *buf, pos_T *pos) {
}
if (pos->col > 0) {
- line = ml_get_buf(buf, pos->lnum, FALSE);
+ line = ml_get_buf(buf, pos->lnum, false);
len = (colnr_T)STRLEN(line);
- if (pos->col > len)
+ if (pos->col > len) {
pos->col = len;
+ }
}
}
diff --git a/src/nvim/move.c b/src/nvim/move.c
index 9ba515f209..4c3f82bc16 100644
--- a/src/nvim/move.c
+++ b/src/nvim/move.c
@@ -1878,8 +1878,9 @@ int onepage(int dir, long count)
}
foldAdjustCursor();
check_cursor_col();
- if (retval == OK)
+ if (retval == OK) {
beginline(BL_SOL | BL_FIX);
+ }
curwin->w_valid &= ~(VALID_WCOL|VALID_WROW|VALID_VIRTCOL);
/*
diff --git a/src/nvim/normal.c b/src/nvim/normal.c
index 489eec8474..5a89fed207 100644
--- a/src/nvim/normal.c
+++ b/src/nvim/normal.c
@@ -1917,7 +1917,7 @@ void do_pending_operator(cmdarg_T *cap, int old_col, bool gui_yank)
// Restore linebreak, so that when the user edits it looks as
// before.
curwin->w_p_lbr = lbr_saved;
- op_function(oap); /* call 'operatorfunc' */
+ op_function(oap); // call 'operatorfunc'
break;
case OP_INSERT:
@@ -4769,10 +4769,10 @@ static void nv_ident(cmdarg_T *cap)
ptr = vim_strnsave(ptr, n);
if (kp_ex) {
// Escape the argument properly for an Ex command
- p = vim_strsave_fnameescape(ptr, FALSE);
+ p = vim_strsave_fnameescape(ptr, false);
} else {
// Escape the argument properly for a shell command
- p = vim_strsave_shellescape(ptr, TRUE, TRUE);
+ p = vim_strsave_shellescape(ptr, true, true);
}
xfree(ptr);
char *newbuf = xrealloc(buf, STRLEN(buf) + STRLEN(p) + 1);
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index 3a682b6f96..c13b6f736a 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -3862,14 +3862,14 @@ fex_format (
if (fex == NULL) {
return 0;
}
- /*
- * Evaluate the function.
- */
- if (use_sandbox)
- ++sandbox;
+ // Evaluate the function.
+ if (use_sandbox) {
+ sandbox++;
+ }
r = (int)eval_to_number(fex);
- if (use_sandbox)
- --sandbox;
+ if (use_sandbox) {
+ sandbox--;
+ }
set_vim_var_string(VV_CHAR, NULL, -1);
xfree(fex);