aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2022-09-06 16:23:00 +0200
committerGitHub <noreply@github.com>2022-09-06 07:23:00 -0700
commit12afc344deb2df3973904fe55813d700da985dbf (patch)
treed60d9da9563eabe9ea30a17e20f9c8dc21e4f495 /src/nvim/ops.c
parent84d1094958fdbdda67f629197924d4146e2a1887 (diff)
downloadrneovim-12afc344deb2df3973904fe55813d700da985dbf.tar.gz
rneovim-12afc344deb2df3973904fe55813d700da985dbf.tar.bz2
rneovim-12afc344deb2df3973904fe55813d700da985dbf.zip
refactor: migrate comment style 2 #20080
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r--src/nvim/ops.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index 25b957e3b9..5d505f41a2 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -681,9 +681,9 @@ void op_reindent(oparg_T *oap, Indenter how)
curwin->w_cursor.lnum = start_lnum;
beginline(BL_SOL | BL_FIX);
- /* Mark changed lines so that they will be redrawn. When Visual
- * highlighting was present, need to continue until the last line. When
- * there is no change still need to remove the Visual highlighting. */
+ // Mark changed lines so that they will be redrawn. When Visual
+ // highlighting was present, need to continue until the last line. When
+ // there is no change still need to remove the Visual highlighting.
if (last_changed != 0) {
changed_lines(first_changed, 0,
oap->is_VIsual ? start_lnum + (linenr_T)oap->line_count :
@@ -748,12 +748,12 @@ char_u *get_expr_line(void)
return NULL;
}
- /* Make a copy of the expression, because evaluating it may cause it to be
- * changed. */
+ // Make a copy of the expression, because evaluating it may cause it to be
+ // changed.
expr_copy = vim_strsave(expr_line);
- /* When we are invoked recursively limit the evaluation to 10 levels.
- * Then return the string as-is. */
+ // When we are invoked recursively limit the evaluation to 10 levels.
+ // Then return the string as-is.
if (nested >= 10) {
return expr_copy;
}
@@ -1431,8 +1431,8 @@ bool cmdline_paste_reg(int regname, bool literally_arg, bool remcr)
cmdline_paste_str((char_u *)"\r", literally);
}
- /* Check for CTRL-C, in case someone tries to paste a few thousand
- * lines and gets bored. */
+ // Check for CTRL-C, in case someone tries to paste a few thousand
+ // lines and gets bored.
os_breakcheck();
if (got_int) {
return FAIL;
@@ -2677,8 +2677,7 @@ static void op_yank_reg(oparg_T *oap, bool message, yankreg_T *reg, bool append)
if (virtual_op) {
getvcol(curwin, &oap->start, &cs, NULL, &ce);
if (ce != cs && oap->start.coladd > 0) {
- /* Part of a tab selected -- but don't
- * double-count it. */
+ // Part of a tab selected -- but don't double-count it.
bd.startspaces = (ce - cs + 1)
- oap->start.coladd;
startcol++;
@@ -3043,9 +3042,9 @@ void do_put(int regname, yankreg_T *reg, int dir, long count, int flags)
if (insert_string != NULL) {
y_type = kMTCharWise;
if (regname == '=') {
- /* For the = register we need to split the string at NL
- * characters.
- * Loop twice: count the number of lines and save them. */
+ // For the = register we need to split the string at NL
+ // characters.
+ // Loop twice: count the number of lines and save them.
for (;;) {
y_size = 0;
ptr = insert_string;
@@ -3285,9 +3284,9 @@ void do_put(int regname, yankreg_T *reg, int dir, long count, int flags)
delcount = 1;
bd.textcol -= utf_head_off(oldp, oldp + bd.textcol);
if (oldp[bd.textcol] != TAB) {
- /* Only a Tab can be split into spaces. Other
- * characters will have to be moved to after the
- * block, causing misalignment. */
+ // Only a Tab can be split into spaces. Other
+ // characters will have to be moved to after the
+ // block, causing misalignment.
delcount = 0;
bd.endspaces = 0;
}