diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-06-30 18:46:22 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-30 18:46:22 -0400 |
commit | d83bc835b6fad17c666807ecf63e68350416c269 (patch) | |
tree | d4fd6c8eaf19978e07c06aa33044e2bb1131cfe0 /src/nvim/ops.c | |
parent | fe10a4e5550d63390d8ff4bc8b91ccb00e9da00f (diff) | |
parent | b2cc43b45494e4756c653580f1e2f486459a9d9c (diff) | |
download | rneovim-d83bc835b6fad17c666807ecf63e68350416c269.tar.gz rneovim-d83bc835b6fad17c666807ecf63e68350416c269.tar.bz2 rneovim-d83bc835b6fad17c666807ecf63e68350416c269.zip |
Merge pull request #14938 from janlazo/vim-8.2.3072
vim-patch:8.2.{3072,3075}
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r-- | src/nvim/ops.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c index 04a8fc8499..855f63ba7b 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -2719,10 +2719,13 @@ static void op_yank_reg(oparg_T *oap, bool message, yankreg_T *reg, bool append) // Copy a block range into a register. // If "exclude_trailing_space" is set, do not copy trailing whitespaces. -static void yank_copy_line(yankreg_T *reg, const struct block_def *bd, +static void yank_copy_line(yankreg_T *reg, struct block_def *bd, size_t y_idx, bool exclude_trailing_space) FUNC_ATTR_NONNULL_ALL { + if (exclude_trailing_space) { + bd->endspaces = 0; + } int size = bd->startspaces + bd->endspaces + bd->textlen; assert(size >= 0); char_u *pnew = xmallocz((size_t)size); |