Patch 8.2.3564
Problem: Invalid memory access when scrolling without a valid screen.
Solution: Do not set VALID_BOTLINE in w_valid.
Files: src/move.c, src/testdir/test_normal.vim
*** ../vim-8.2.3563/src/move.c 2021-10-09 15:39:20.459884353 +0100
--- src/move.c 2021-10-25 17:05:17.215471975 +0100
***************
*** 199,205 ****
check_cursor_lnum();
curwin->w_topline = curwin->w_cursor.lnum;
curwin->w_botline = curwin->w_topline;
- curwin->w_valid |= VALID_BOTLINE|VALID_BOTLINE_AP;
curwin->w_scbind_pos = 1;
return;
}
--- 199,204 ----
*** ../vim-8.2.3563/src/testdir/test_normal.vim 2021-07-15 11:48:08.811766844
+0100
--- src/testdir/test_normal.vim 2021-10-25 17:05:44.231811326 +0100
***************
*** 34,47 ****
else
silent exe "normal! `[v`]y"
endif
! let g:a=strlen(substitute(@@, '[^ ]', '', 'g'))
let &selection = sel_save
let @@ = reg_save
endfunc
func OpfuncDummy(type, ...)
" for testing operatorfunc
! let g:opt=&linebreak
if a:0 " Invoked from Visual mode, use gv command.
silent exe "normal! gvy"
--- 34,47 ----
else
silent exe "normal! `[v`]y"
endif
! let g:a = strlen(substitute(@@, '[^ ]', '', 'g'))
let &selection = sel_save
let @@ = reg_save
endfunc
func OpfuncDummy(type, ...)
" for testing operatorfunc
! let g:opt = &linebreak
if a:0 " Invoked from Visual mode, use gv command.
silent exe "normal! gvy"
***************
*** 52,58 ****
endif
" Create a new dummy window
new
! let g:bufnr=bufnr('%')
endfunc
func Test_normal00_optrans()
--- 52,58 ----
endif
" Create a new dummy window
new
! let g:bufnr = bufnr('%')
endfunc
func Test_normal00_optrans()
***************
*** 987,992 ****
--- 987,1008 ----
close!
endfunc
+ func Test_scroll_in_ex_mode()
+ " This was using invalid memory because w_botline was invalid.
+ let lines =<< trim END
+ diffsplit
+ norm os0 0(
+ call writefile(['done'], 'Xdone')
+ qa!
+ END
+ call writefile(lines, 'Xscript')
+ call assert_equal(1, RunVim([], [], '--clean -X -Z -e -s -S Xscript'))
+ call assert_equal(['done'], readfile('Xdone'))
+
+ call delete('Xscript')
+ call delete('Xdone')
+ endfunc
+
" Test for the 'sidescroll' option
func Test_sidescroll_opt()
new
*** ../vim-8.2.3563/src/version.c 2021-10-25 10:30:10.052617832 +0100
--- src/version.c 2021-10-25 17:05:55.423952006 +0100
***************
*** 759,760 ****
--- 759,762 ----
{ /* Add new patch number below this line */
+ /**/
+ 3564,
/**/
--
"After a few years of marriage a man can look right at a woman
without seeing her and a woman can see right through a man
without looking at him."
- Helen Rowland
/// 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/20211025160741.EC6D7C80054%40moolenaar.net.