Permalink
Browse files

patch 8.0.0330: illegal memory access after "vapo"

Problem:    Illegal memory access after "vapo". (Dominique Pelle)
Solution:   Fix the cursor column.
  • Loading branch information...
brammool committed Feb 17, 2017
1 parent 1043467 commit 84b2a381451e9068b09ef6d85f5e8cf1598e7355
Showing with 14 additions and 1 deletion.
  1. +5 −1 src/search.c
  2. +7 −0 src/testdir/test_visual.vim
  3. +2 −0 src/version.c
View
@@ -4241,7 +4241,11 @@ current_par(
* line, we get stuck there. Trap this here. */
if (VIsual_mode == 'V' && start_lnum == curwin->w_cursor.lnum)
goto extend;
- VIsual.lnum = start_lnum;
+ if (VIsual.lnum != start_lnum)
+ {
+ VIsual.lnum = start_lnum;
+ VIsual.col = 0;
+ }
VIsual_mode = 'V';
redraw_curbuf_later(INVERTED); /* update the inversion */
showmode();
@@ -36,3 +36,10 @@ func Test_Visual_ctrl_o()
set tw&
bw!
endfu
+
+func Test_Visual_vapo()
+ new
+ normal oxx
+ normal vapo
+ bwipe!
+endfunc
View
@@ -764,6 +764,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 330,
/**/
329,
/**/

0 comments on commit 84b2a38

Please sign in to comment.