aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2017-01-23 23:13:25 -0500
committerJames McCoy <jamessan@jamessan.com>2017-06-04 22:12:14 -0400
commit43534cab025fa57109c832f13fb567da2299e707 (patch)
treeb952c31f930a0fb695a775d7986ebdedf200ce29 /src/nvim/ops.c
parent2fb0a62553480406a1b8ea314a528f00692c365a (diff)
downloadrneovim-43534cab025fa57109c832f13fb567da2299e707.tar.gz
rneovim-43534cab025fa57109c832f13fb567da2299e707.tar.bz2
rneovim-43534cab025fa57109c832f13fb567da2299e707.zip
lint
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r--src/nvim/ops.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index ce34e26994..c5660f68fd 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -938,13 +938,11 @@ static int stuff_yank(int regname, char_u *p)
static int execreg_lastc = NUL;
-/*
- * Execute a yank register: copy it into the stuff buffer
- *
- * Return FAIL for failure, OK otherwise
- */
-int
-do_execreg (
+/// Execute a yank register: copy it into the stuff buffer
+///
+/// Return FAIL for failure, OK otherwise
+int
+do_execreg(
int regname,
int colon, /* insert ':' before each line */
int addcr, /* always add '\n' to end of line */
@@ -4635,8 +4633,8 @@ int do_addsub(int op_type, pos_T *pos, int length, linenr_T Prenum1)
oldn = n;
- n = subtract ? n - (uvarnumber_T) Prenum1
- : n + (uvarnumber_T) Prenum1;
+ n = subtract ? n - (uvarnumber_T)Prenum1
+ : n + (uvarnumber_T)Prenum1;
// handle wraparound for decimal numbers
if (!pre) {
@@ -5397,15 +5395,16 @@ void cursor_pos_info(dict_T *dict)
if (lnum == curwin->w_cursor.lnum) {
word_count_cursor += word_count;
char_count_cursor += char_count;
- byte_count_cursor = byte_count +
- line_count_info(ml_get(lnum),
- &word_count_cursor, &char_count_cursor,
- (varnumber_T)(curwin->w_cursor.col + 1), eol_size);
+ byte_count_cursor = byte_count
+ + line_count_info(ml_get(lnum), &word_count_cursor,
+ &char_count_cursor,
+ (varnumber_T)(curwin->w_cursor.col + 1),
+ eol_size);
}
}
- /* Add to the running totals */
- byte_count += line_count_info(ml_get(lnum), &word_count,
- &char_count, (varnumber_T)MAXCOL, eol_size);
+ // Add to the running totals
+ byte_count += line_count_info(ml_get(lnum), &word_count, &char_count,
+ (varnumber_T)MAXCOL, eol_size);
}
// Correction for when last line doesn't have an EOL.