aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-10-23 13:05:19 -0400
committerGitHub <noreply@github.com>2021-10-23 13:05:19 -0400
commitbb9e6a15834dcab2cb58afe22fedd0a4d818d9a8 (patch)
tree0367fad361ebed9832d7d9bd9018dff1a670dc39 /src/nvim/ex_getln.c
parentfa4b24072e13dc7303e896701f0bb6d0227caf0c (diff)
parente59c0009a76cee92bedf72fbd1db04e4a16ed24b (diff)
downloadrneovim-bb9e6a15834dcab2cb58afe22fedd0a4d818d9a8.tar.gz
rneovim-bb9e6a15834dcab2cb58afe22fedd0a4d818d9a8.tar.bz2
rneovim-bb9e6a15834dcab2cb58afe22fedd0a4d818d9a8.zip
Merge pull request #16111 from dundargoc/vim-patch/comments
vim-patch:8.1.2368,8.1.2378,8.1.2379,8.1.2380,8.1.2387,8.1.2388,8.1.2392,8.1.2394,8.1.2395,8.1.2396
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r--src/nvim/ex_getln.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index 62a4d48645..79c36576d5 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -2625,8 +2625,8 @@ static void realloc_cmdbuff(int len)
char_u *p = ccline.cmdbuff;
alloc_cmdbuff(len); // will get some more
- /* There isn't always a NUL after the command, but it may need to be
- * there, thus copy up to the NUL and add a NUL. */
+ // There isn't always a NUL after the command, but it may need to be
+ // there, thus copy up to the NUL and add a NUL.
memmove(ccline.cmdbuff, p, (size_t)ccline.cmdlen);
ccline.cmdbuff[ccline.cmdlen] = NUL;
xfree(p);
@@ -3427,24 +3427,24 @@ static bool cmdline_paste(int regname, bool literally, bool remcr)
bool allocated;
struct cmdline_info save_ccline;
- /* check for valid regname; also accept special characters for CTRL-R in
- * the command line */
+ // check for valid regname; also accept special characters for CTRL-R in
+ // the command line
if (regname != Ctrl_F && regname != Ctrl_P && regname != Ctrl_W
&& regname != Ctrl_A && regname != Ctrl_L
&& !valid_yank_reg(regname, false)) {
return FAIL;
}
- /* A register containing CTRL-R can cause an endless loop. Allow using
- * CTRL-C to break the loop. */
+ // A register containing CTRL-R can cause an endless loop. Allow using
+ // CTRL-C to break the loop.
line_breakcheck();
if (got_int) {
return FAIL;
}
- /* Need to save and restore ccline. And set "textlock" to avoid nasty
- * things like going to another buffer when evaluating an expression. */
+ // Need to save and restore ccline. And set "textlock" to avoid nasty
+ // things like going to another buffer when evaluating an expression.
save_cmdline(&save_ccline);
textlock++;
const bool i = get_spec_reg(regname, &arg, &allocated, true);
@@ -6411,8 +6411,8 @@ static int open_cmdwin(void)
}
}
- /* Replace the empty last line with the current command-line and put the
- * cursor there. */
+ // Replace the empty last line with the current command-line and put the
+ // cursor there.
ml_replace(curbuf->b_ml.ml_line_count, ccline.cmdbuff, true);
curwin->w_cursor.lnum = curbuf->b_ml.ml_line_count;
curwin->w_cursor.col = ccline.cmdpos;