aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-03-05 18:00:08 -0500
committerJustin M. Keyes <justinkz@gmail.com>2016-03-05 18:00:08 -0500
commitbd81239f2f98e46f8565c7d80d586381881e78b4 (patch)
treef63ea0d5b65e55b09ee2f1c6893a1b7187e98ea8 /src/nvim/ex_getln.c
parent1895f6ffab1b76d483c5e361d7471dfc8914df61 (diff)
parent3d9e9a92cf292dac807c69e3c046b288df0dfb00 (diff)
downloadrneovim-bd81239f2f98e46f8565c7d80d586381881e78b4.tar.gz
rneovim-bd81239f2f98e46f8565c7d80d586381881e78b4.tar.bz2
rneovim-bd81239f2f98e46f8565c7d80d586381881e78b4.zip
Merge pull request #4324 from watiko/vim-7.4.973
vim-patch:7.4.973
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r--src/nvim/ex_getln.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index 39bff9b2ad..cffda1ca55 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -1130,7 +1130,7 @@ static int command_line_handle_key(CommandLineState *s)
if (!mouse_has(MOUSE_COMMAND)) {
return command_line_not_changed(s); // Ignore mouse
}
- cmdline_paste(0, true, true);
+ cmdline_paste(eval_has_provider("clipboard") ? '*' : 0, true, true);
redrawcmd();
return command_line_changed(s);
@@ -2424,20 +2424,17 @@ void restore_cmdline_alloc(char_u *p)
xfree(p);
}
-/*
- * paste a yank register into the command line.
- * used by CTRL-R command in command-line mode
- * insert_reg() can't be used here, because special characters from the
- * register contents will be interpreted as commands.
- *
- * return FAIL for failure, OK otherwise
- */
-static int
-cmdline_paste (
- int regname,
- int literally, /* Insert text literally instead of "as typed" */
- int remcr /* remove trailing CR */
-)
+/// Paste a yank register into the command line.
+/// Used by CTRL-R command in command-line mode.
+/// insert_reg() can't be used here, because special characters from the
+/// register contents will be interpreted as commands.
+///
+/// @param regname Register name.
+/// @param literally Insert text literally instead of "as typed".
+/// @param remcr When true, remove trailing CR.
+///
+/// @returns FAIL for failure, OK otherwise
+static bool cmdline_paste(int regname, bool literally, bool remcr)
{
long i;
char_u *arg;