To: vim_dev@googlegroups.com Subject: Patch 7.4.2322 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.2322 Problem: Access memory beyond the end of the line. (Dominique Pelle) Solution: Adjust the cursor column. Files: src/move.c, src/testdir/test_normal.vim *** ../vim-7.4.2321/src/move.c 2016-08-29 22:48:12.153106148 +0200 --- src/move.c 2016-09-04 14:29:37.940164391 +0200 *************** *** 2479,2484 **** --- 2479,2485 ---- foldAdjustCursor(); #endif cursor_correct(); + check_cursor_col(); if (retval == OK) beginline(BL_SOL | BL_FIX); curwin->w_valid &= ~(VALID_WCOL|VALID_WROW|VALID_VIRTCOL); *** ../vim-7.4.2321/src/testdir/test_normal.vim 2016-09-03 19:11:55.121044148 +0200 --- src/testdir/test_normal.vim 2016-09-04 14:28:55.956517412 +0200 *************** *** 398,403 **** --- 398,412 ---- bw! endfu + func! Test_normal14_page_eol() + 10new + norm oxxxxxxx + exe "norm 2\" + " check with valgrind that cursor is put back in column 1 + exe "norm 2\" + bw! + endfunc + func! Test_normal15_z_scroll_vert() " basic test for z commands that scroll the window call Setup_NewWindow() *** ../vim-7.4.2321/src/version.c 2016-09-03 22:35:02.396409822 +0200 --- src/version.c 2016-09-04 14:33:11.014373769 +0200 *************** *** 765,766 **** --- 765,768 ---- { /* Add new patch number below this line */ + /**/ + 2322, /**/ -- hundred-and-one symptoms of being an internet addict: 161. You get up before the sun rises to check your e-mail, and you find yourself in the very same chair long after the sun has set. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///