Permalink
Browse files

patch 7.4.2322

Problem:    Access memory beyond the end of the line. (Dominique Pelle)
Solution:   Adjust the cursor column.
  • Loading branch information...
1 parent dac1947 commit bc54f3f3fed4dc3556df8c46cee6739d211b0eb2 @brammool brammool committed Sep 4, 2016
Showing with 12 additions and 0 deletions.
  1. +1 −0 src/move.c
  2. +9 −0 src/testdir/test_normal.vim
  3. +2 −0 src/version.c
View
@@ -2479,6 +2479,7 @@ onepage(int dir, long count)
foldAdjustCursor();
#endif
cursor_correct();
+ check_cursor_col();
if (retval == OK)
beginline(BL_SOL | BL_FIX);
curwin->w_valid &= ~(VALID_WCOL|VALID_WROW|VALID_VIRTCOL);
@@ -398,6 +398,15 @@ func! Test_normal14_page()
bw!
endfu
+func! Test_normal14_page_eol()
+ 10new
+ norm oxxxxxxx
+ exe "norm 2\<c-f>"
+ " check with valgrind that cursor is put back in column 1
+ exe "norm 2\<c-b>"
+ bw!
+endfunc
+
func! Test_normal15_z_scroll_vert()
" basic test for z commands that scroll the window
call Setup_NewWindow()
View
@@ -764,6 +764,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2322,
+/**/
2321,
/**/
2320,

0 comments on commit bc54f3f

Please sign in to comment.