To: vim_dev@googlegroups.com Subject: Patch 8.2.4215 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4215 Problem: Illegal memory access when copying lines in Visual mode. Solution: Adjust the Visual position after copying lines. Files: src/ex_cmds.c, src/testdir/test_visual.vim *** ../vim-8.2.4214/src/ex_cmds.c 2022-01-05 16:08:59.516426454 +0000 --- src/ex_cmds.c 2022-01-25 13:50:14.260839795 +0000 *************** *** 866,871 **** --- 866,873 ---- } appended_lines_mark(n, count); + if (VIsual_active) + check_pos(curbuf, &VIsual); msgmore((long)count); } *** ../vim-8.2.4214/src/testdir/test_visual.vim 2022-01-20 13:32:46.679047565 +0000 --- src/testdir/test_visual.vim 2022-01-25 13:44:44.628305766 +0000 *************** *** 1328,1332 **** --- 1328,1343 ---- bwipe! endfunc + " this was leaving the end of the Visual area beyond the end of a line + func Test_visual_ex_copy_line() + new + call setline(1, ["aaa", "bbbbbbbbbxbb"]) + /x + exe "normal ggvjfxO" + t0 + normal gNU + bwipe! + endfunc + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.2.4214/src/version.c 2022-01-25 11:54:59.202464201 +0000 --- src/version.c 2022-01-25 13:51:05.651704659 +0000 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 4215, /**/ -- Yesterday, all my deadlines seemed so far away now it looks as though it's freeze in four days oh I believe in cvs.. [ CVS log "Beatles style" for FreeBSD ports/INDEX, Satoshi Asami ] /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///