patch 8.2.2971: cannot yank a block without trailing spaces
Problem: Cannot yank a block without trailing spaces.
Solution: Add the "zy" command. (Christian Brabandt, closes #8292)
diff --git a/src/ops.c b/src/ops.c
index 48d629d..73faa16 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -78,6 +78,8 @@
return OP_NR_ADD;
if (char1 == 'g' && char2 == Ctrl_X) // subtract
return OP_NR_SUB;
+ if (char1 == 'z' && char2 == 'y') // OP_YANK
+ return OP_YANK;
for (i = 0; ; ++i)
{
if (opchars[i][0] == char1 && opchars[i][1] == char2)
@@ -3894,6 +3896,7 @@
#ifdef FEAT_LINEBREAK
curwin->w_p_lbr = lbr_saved;
#endif
+ oap->excl_tr_ws = cap->cmdchar == 'z';
(void)op_yank(oap, FALSE, !gui_yank);
}
check_cursor_col();