forked from aniani/vim
patch 9.0.1606: using freed memory when 'foldcolumn' is set
Problem: Using freed memory when 'foldcolumn' is set. Solution: Save extra pointer to free it later. (closes #12492)
This commit is contained in:
@@ -1755,4 +1755,18 @@ func Test_fold_screenrow_motion()
|
||||
norm Ggkzo
|
||||
call assert_equal(1, line('.'))
|
||||
endfunc
|
||||
|
||||
" This was using freed memory
|
||||
func Test_foldcolumn_linebreak_control_char()
|
||||
CheckFeature linebreak
|
||||
|
||||
5vnew
|
||||
setlocal foldcolumn=1 linebreak
|
||||
call setline(1, "aaa\<C-A>b")
|
||||
redraw
|
||||
call assert_equal([' aaa^', ' Ab '], ScreenLines([1, 2], 5))
|
||||
call assert_equal(screenattr(1, 5), screenattr(2, 2))
|
||||
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user