mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:9.0.0991: crash when reading help index with various options set
Problem: Crash when reading help index with various options set. (Marius
Gedminas)
Solution: Do not set wlv.c_extra to NUL when wlv.p_extra is NULL.
(closes vim/vim#11651)
c67c89c758
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
parent
c2e602b9d0
commit
4a3594f60e
@ -2170,7 +2170,7 @@ int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool nochange,
|
||||
c = (n_extra == 0 && wp->w_p_lcs_chars.tab3)
|
||||
? wp->w_p_lcs_chars.tab3
|
||||
: wp->w_p_lcs_chars.tab1;
|
||||
if (wp->w_p_lbr) {
|
||||
if (wp->w_p_lbr && p_extra != NULL) {
|
||||
c_extra = NUL; // using p_extra from above
|
||||
} else {
|
||||
c_extra = wp->w_p_lcs_chars.tab2;
|
||||
|
@ -1075,4 +1075,22 @@ func Test_breakindent_column()
|
||||
bwipeout!
|
||||
endfunc
|
||||
|
||||
func Test_linebreak_list()
|
||||
" This was setting wlv.c_extra to NUL while wlv.p_extra is NULL
|
||||
filetype plugin on
|
||||
syntax enable
|
||||
edit! $VIMRUNTIME/doc/index.txt
|
||||
/v_P
|
||||
|
||||
setlocal list
|
||||
setlocal listchars=tab:>-
|
||||
setlocal linebreak
|
||||
setlocal nowrap
|
||||
setlocal filetype=help
|
||||
redraw!
|
||||
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
Loading…
Reference in New Issue
Block a user