aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-03-29 18:40:54 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-03-29 19:34:45 -0400
commitaf2f0ffdf4261bf1167f044ca771fa225f2ae977 (patch)
tree8256f108b6f411df484062617d733e8f1217b4af /src/nvim/ops.c
parent9d28875d50db01853944d96200579d44a9f973f6 (diff)
downloadrneovim-af2f0ffdf4261bf1167f044ca771fa225f2ae977.tar.gz
rneovim-af2f0ffdf4261bf1167f044ca771fa225f2ae977.tar.bz2
rneovim-af2f0ffdf4261bf1167f044ca771fa225f2ae977.zip
vim-patch:8.1.2380: using old C style comments
Problem: Using old C style comments. Solution: Use // comments where appropriate. https://github.com/vim/vim/commit/306139005c31ea7e6f892dd119beba3c94dcb982
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r--src/nvim/ops.c39
1 files changed, 23 insertions, 16 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index e5de57ceaa..2d351f4dba 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -1079,13 +1079,15 @@ do_execreg(
}
}
escaped = vim_strsave_escape_csi(reg->y_array[i]);
- retval = ins_typebuf(escaped, remap, 0, TRUE, silent);
+ retval = ins_typebuf(escaped, remap, 0, true, silent);
xfree(escaped);
- if (retval == FAIL)
+ if (retval == FAIL) {
return FAIL;
- if (colon && ins_typebuf((char_u *)":", remap, 0, TRUE, silent)
- == FAIL)
+ }
+ if (colon
+ && ins_typebuf((char_u *)":", remap, 0, true, silent) == FAIL) {
return FAIL;
+ }
}
reg_executing = regname == 0 ? '"' : regname; // disable the 'q' command
}
@@ -1109,8 +1111,9 @@ static void put_reedit_in_typebuf(int silent)
buf[0] = (char_u)(restart_edit == 'I' ? 'i' : restart_edit);
buf[1] = NUL;
}
- if (ins_typebuf(buf, REMAP_NONE, 0, TRUE, silent) == OK)
+ if (ins_typebuf(buf, REMAP_NONE, 0, true, silent) == OK) {
restart_edit = NUL;
+ }
}
}
@@ -1130,25 +1133,29 @@ static int put_in_typebuf(
int retval = OK;
put_reedit_in_typebuf(silent);
- if (colon)
- retval = ins_typebuf((char_u *)"\n", REMAP_NONE, 0, TRUE, silent);
+ if (colon) {
+ retval = ins_typebuf((char_u *)"\n", REMAP_NONE, 0, true, silent);
+ }
if (retval == OK) {
char_u *p;
- if (esc)
+ if (esc) {
p = vim_strsave_escape_csi(s);
- else
+ } else {
p = s;
- if (p == NULL)
+ }
+ if (p == NULL) {
retval = FAIL;
- else
- retval = ins_typebuf(p, esc ? REMAP_NONE : REMAP_YES,
- 0, TRUE, silent);
- if (esc)
+ } else {
+ retval = ins_typebuf(p, esc ? REMAP_NONE : REMAP_YES, 0, true, silent);
+ }
+ if (esc) {
xfree(p);
+ }
+ }
+ if (colon && retval == OK) {
+ retval = ins_typebuf((char_u *)":", REMAP_NONE, 0, true, silent);
}
- if (colon && retval == OK)
- retval = ins_typebuf((char_u *)":", REMAP_NONE, 0, TRUE, silent);
return retval;
}