aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2017-02-22 17:07:47 -0500
committerJames McCoy <jamessan@jamessan.com>2017-02-22 19:23:20 -0500
commitbc76ce2c4f26a1ceabc8ba7dc8d5ff3378648a40 (patch)
treeb5b295f6a593f77f6995e6d6478afdf37043b11d /src/nvim/ops.c
parent10c9ecc2117a69d2b83e983082f53c1779547035 (diff)
parentddab4661f7acad985096138b0c29a2b7e569022a (diff)
downloadrneovim-bc76ce2c4f26a1ceabc8ba7dc8d5ff3378648a40.tar.gz
rneovim-bc76ce2c4f26a1ceabc8ba7dc8d5ff3378648a40.tar.bz2
rneovim-bc76ce2c4f26a1ceabc8ba7dc8d5ff3378648a40.zip
Merge remote-tracking branch 'origin/master' into lambda
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r--src/nvim/ops.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index d58c8700ca..8bfda3c193 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -1260,7 +1260,7 @@ int get_spec_reg(
/// Paste a yank register into the command line.
/// Only for non-special registers.
-/// Used by CTRL-R command in command-line mode
+/// Used by CTRL-R in command-line mode.
/// insert_reg() can't be used here, because special characters from the
/// register contents will be interpreted as commands.
///
@@ -1278,9 +1278,8 @@ bool cmdline_paste_reg(int regname, bool literally, bool remcr)
for (size_t i = 0; i < reg->y_size; i++) {
cmdline_paste_str(reg->y_array[i], literally);
- // Insert ^M between lines and after last line if type is kMTLineWise.
- // Don't do this when "remcr" is true.
- if ((reg->y_type == kMTLineWise || i < reg->y_size - 1) && !remcr) {
+ // Insert ^M between lines, unless `remcr` is true.
+ if (i < reg->y_size - 1 && !remcr) {
cmdline_paste_str((char_u *)"\r", literally);
}