aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-06-29 21:13:07 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-06-29 21:40:48 -0400
commitb2cc43b45494e4756c653580f1e2f486459a9d9c (patch)
tree4358ed207f03d67b768ae376a43b32cad33d1e35 /src/nvim/ops.c
parent384f9870f62f9e67fab45b717d8536d52080c473 (diff)
downloadrneovim-b2cc43b45494e4756c653580f1e2f486459a9d9c.tar.gz
rneovim-b2cc43b45494e4756c653580f1e2f486459a9d9c.tar.bz2
rneovim-b2cc43b45494e4756c653580f1e2f486459a9d9c.zip
vim-patch:8.2.3072: "zy" does not work well when "virtualedit' is "block"
Problem: The "zy" command does not work well when 'virtualedit' is set to "block". (Johann Höchtl) Solution: Make endspaces zero. (Christian Brabandt, closes vim/vim#8468, closes vim/vim#8448) https://github.com/vim/vim/commit/7d7bcc6ba01454c1cbb1dcbf5f11c3a4051535d6 N/A patches for version.c: vim-patch:8.2.3075: xxd always reports an old version string Problem: Xxd always reports an old version string. (Åsmund Ervik) Solution: Update the version string with the last known change date. (Jürgen Weigert, closes vim/vim#8475) https://github.com/vim/vim/commit/80b2ba3e9602e09ab523e78946fbb26da311b68b
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r--src/nvim/ops.c5
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);