diff src/ops.c @ 24866:f1121eb17e14 v8.2.2971

patch 8.2.2971: cannot yank a block without trailing spaces Commit: https://github.com/vim/vim/commit/544a38e44db0f25ec4fa7a2a4666cf28a2336f33 Author: Christian Brabandt <cb@256bit.org> Date: Thu Jun 10 19:39:11 2021 +0200 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 https://github.com/vim/vim/issues/8292)
author Bram Moolenaar <Bram@vim.org>
date Thu, 10 Jun 2021 19:45:02 +0200
parents 7334bf933510
children 8f2262c72178
line wrap: on
line diff
--- a/src/ops.c
+++ b/src/ops.c
@@ -78,6 +78,8 @@ get_op_type(int char1, int char2)
 	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 @@ do_pending_operator(cmdarg_T *cap, int o
 #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();