comparison 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
comparison
equal deleted inserted replaced
24865:8dfff43cdcb8 24866:f1121eb17e14
76 return OP_TILDE; 76 return OP_TILDE;
77 if (char1 == 'g' && char2 == Ctrl_A) // add 77 if (char1 == 'g' && char2 == Ctrl_A) // add
78 return OP_NR_ADD; 78 return OP_NR_ADD;
79 if (char1 == 'g' && char2 == Ctrl_X) // subtract 79 if (char1 == 'g' && char2 == Ctrl_X) // subtract
80 return OP_NR_SUB; 80 return OP_NR_SUB;
81 if (char1 == 'z' && char2 == 'y') // OP_YANK
82 return OP_YANK;
81 for (i = 0; ; ++i) 83 for (i = 0; ; ++i)
82 { 84 {
83 if (opchars[i][0] == char1 && opchars[i][1] == char2) 85 if (opchars[i][0] == char1 && opchars[i][1] == char2)
84 break; 86 break;
85 if (i == (int)ARRAY_LENGTH(opchars) - 1) 87 if (i == (int)ARRAY_LENGTH(opchars) - 1)
3892 else 3894 else
3893 { 3895 {
3894 #ifdef FEAT_LINEBREAK 3896 #ifdef FEAT_LINEBREAK
3895 curwin->w_p_lbr = lbr_saved; 3897 curwin->w_p_lbr = lbr_saved;
3896 #endif 3898 #endif
3899 oap->excl_tr_ws = cap->cmdchar == 'z';
3897 (void)op_yank(oap, FALSE, !gui_yank); 3900 (void)op_yank(oap, FALSE, !gui_yank);
3898 } 3901 }
3899 check_cursor_col(); 3902 check_cursor_col();
3900 break; 3903 break;
3901 3904