neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 4a3594f60e854db56589f30cec4fc16c8a46fe30
parent c2e602b9d0a09407179f5ccd8ff5c1a8b409280a
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Fri,  3 Mar 2023 07:41:57 +0800

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)

https://github.com/vim/vim/commit/c67c89c7589253215d57bad588edcf83a9403560

Co-authored-by: Bram Moolenaar <Bram@vim.org>

Diffstat:
Msrc/nvim/drawline.c | 2+-
Msrc/nvim/testdir/test_breakindent.vim | 18++++++++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/src/nvim/drawline.c b/src/nvim/drawline.c @@ -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; diff --git a/src/nvim/testdir/test_breakindent.vim b/src/nvim/testdir/test_breakindent.vim @@ -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