vim-patch:8.2.1170: cursor off by one with block paste while 'virtualedit' "all"

Problem:    Cursor off by one with block paste while 'virtualedit' is "all".
Solution:   Adjust condition. (Hugo Gualandi, closes vim/vim#6430)
ef85a9b2d9

N/A patches for version.c:

vim-patch:8.2.1114: terminal test sometimes times out

Problem:    Terminal test sometimes times out.
Solution:   Split the test in two parts.
1112c0febb

vim-patch:8.2.1171: possible crash when out of memory

Problem:    Possible crash when out of memory.
Solution:   Check for NULL pointer. (Dominique Pellé, closes vim/vim#6432)
58bb61cf5e

vim-patch:8.2.1172: error messages when doing "make clean" in doc or tee

Problem:    Error messages when doing "make clean" in the runtime/doc or
            src/tee directories.
Solution:   Use "rm -f".
08fc48492a

vim-patch:8.2.1173: tee doesn't build on some systems

Problem:    Tee doesn't build on some systems.
Solution:   Include header files. (Dominique Pelle, closes vim/vim#6431)
4004315292

vim-patch:8.2.1177: terminal2 test sometimes hangs in the GUI

Problem:    Terminal2 test sometimes hangs in the GUI.
Solution:   Move some tests to other files to further locate the problem.
            Set the GUI to a fixed screen size.
18aa13d13b

vim-patch:8.2.1179: Test_termwinscroll() sometimes hangs in the GUI

Problem:    Test_termwinscroll() sometimes hangs in the GUI.
Solution:   Skip the test in the GUI.
f65927fc8d

vim-patch:8.2.1180: build failure in small version

Problem:    Build failure in small version.
Solution:   Add #ifdef.
1e624c912d

vim-patch:8.2.1181: json code not fully tested

Problem:    Json code not fully tested.
Solution:   Add more test coverage. (Dominique Pellé, closes vim/vim#6433)
21e5bdd271
This commit is contained in:
Jan Edmund Lazo
2020-07-10 19:29:31 -04:00
parent 0c498200f4
commit be9de61012
2 changed files with 24 additions and 4 deletions

View File

@@ -3080,10 +3080,12 @@ void do_put(int regname, yankreg_T *reg, int dir, long count, int flags)
if (ve_flags == VE_ALL if (ve_flags == VE_ALL
&& (curwin->w_cursor.coladd > 0 && (curwin->w_cursor.coladd > 0
|| endcol2 == curwin->w_cursor.col)) { || endcol2 == curwin->w_cursor.col)) {
if (dir == FORWARD && c == NUL) if (dir == FORWARD && c == NUL) {
++col; col++;
if (dir != FORWARD && c != NUL) }
++curwin->w_cursor.col; if (dir != FORWARD && c != NUL && curwin->w_cursor.coladd > 0) {
curwin->w_cursor.col++;
}
if (c == TAB) { if (c == TAB) {
if (dir == BACKWARD && curwin->w_cursor.col) if (dir == BACKWARD && curwin->w_cursor.col)
curwin->w_cursor.col--; curwin->w_cursor.col--;

View File

@@ -167,4 +167,22 @@ func Test_set_register()
enew! enew!
endfunc endfunc
func Test_ve_blockpaste()
new
set ve=all
0put =['QWERTZ','ASDFGH']
call cursor(1,1)
exe ":norm! \<C-V>3ljdP"
call assert_equal(1, col('.'))
call assert_equal(getline(1, 2), ['QWERTZ', 'ASDFGH'])
call cursor(1,1)
exe ":norm! \<C-V>3ljd"
call cursor(1,1)
norm! $3lP
call assert_equal(5, col('.'))
call assert_equal(getline(1, 2), ['TZ QWER', 'GH ASDF'])
set ve&vim
bwipe!
endfunc
" vim: shiftwidth=2 sts=2 expandtab " vim: shiftwidth=2 sts=2 expandtab