vim-patch:8.1.2375: no suffucient testing for registers

Problem:    No suffucient testing for registers.
Solution:   Add more test cases. (Yegappan Lakshmanan, closes vim/vim#5296)
            Fix that "p" on last virtual column of tab inserts spaces.
6f1f0ca3ed

This patch doesn't actually change any behavior in Nvim, because Nvim
always has vartabs feature.

I modified a line in the test because of #6137.
This commit is contained in:
zeertzjq
2022-01-13 18:26:36 +08:00
parent 9b04336445
commit e1b557d913
4 changed files with 110 additions and 3 deletions

View File

@@ -3154,11 +3154,12 @@ void do_put(int regname, yankreg_T *reg, int dir, long count, int flags)
if (ve_flags == VE_ALL && y_type == kMTCharWise) {
if (gchar_cursor() == TAB) {
/* Don't need to insert spaces when "p" on the last position of a
* tab or "P" on the first position. */
int viscol = getviscol();
long ts = curbuf->b_p_ts;
// Don't need to insert spaces when "p" on the last position of a
// tab or "P" on the first position.
if (dir == FORWARD
? tabstop_padding(viscol, curbuf->b_p_ts, curbuf->b_p_vts_array) != 1
? tabstop_padding(viscol, ts, curbuf->b_p_vts_array) != 1
: curwin->w_cursor.coladd > 0) {
coladvance_force(viscol);
} else {