mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
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)
This commit is contained in:
committed by
Bram Moolenaar
parent
31e299c08f
commit
544a38e44d
@@ -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 old_col, int gui_yank)
|
||||
#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();
|
||||
|
Reference in New Issue
Block a user