aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-02-18 02:39:07 +0100
committerJustin M. Keyes <justinkz@gmail.com>2017-02-18 14:49:05 +0100
commit308ccb6f5e40ba1dbe4abfebc9df3399d7f17504 (patch)
tree4cf89d29a05f58b4e7b97489df8c66f31a18da47 /src/nvim/ex_getln.c
parentb49a74a1afe9740f18ca419dade45705da5bec46 (diff)
downloadrneovim-308ccb6f5e40ba1dbe4abfebc9df3399d7f17504.tar.gz
rneovim-308ccb6f5e40ba1dbe4abfebc9df3399d7f17504.tar.bz2
rneovim-308ccb6f5e40ba1dbe4abfebc9df3399d7f17504.zip
cmdline: CTRL-R: <Space> instead of CR between lines.
^M isn't any more "correct" than space: the "technically correct" interpretation is to execute the first line that is seen (and this is what happens on middle-click paste in Vim). ^M is only intended to defuse the newline, so that the user can review the command. We can do that with a space instead, and then the command can be executed without having to fix it up first.
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r--src/nvim/ex_getln.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index d99c8d02f7..2a4fc067db 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -2471,10 +2471,10 @@ void restore_cmdline_alloc(char_u *p)
///
/// @param regname Register name.
/// @param literally Insert text literally instead of "as typed".
-/// @param remcr When true, remove trailing CR.
+/// @param remspc When true, remove trailing <Space>.
///
/// @returns FAIL for failure, OK otherwise
-static bool cmdline_paste(int regname, bool literally, bool remcr)
+static bool cmdline_paste(int regname, bool literally, bool remspc)
{
long i;
char_u *arg;
@@ -2539,7 +2539,7 @@ static bool cmdline_paste(int regname, bool literally, bool remcr)
return OK;
}
- return cmdline_paste_reg(regname, literally, remcr);
+ return cmdline_paste_reg(regname, literally, remspc);
}
/*