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 -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220125155305.ADD9E1C343A%40moolenaar.net.

Raspunde prin e-mail lui