From 2922f6e34bde27fa9788e806f871f50a2b46e6a7 Mon Sep 17 00:00:00 2001 From: VVKot Date: Sun, 31 Jan 2021 17:19:39 +0000 Subject: vim-patch:8.1.0126: various problems with 'vartabstop' Problem: Various problems with 'vartabstop'. Solution: Fix memory leak. Fix crash. Add a few more tests. (Christian Brabandt, closes vim/vim#3076) https://github.com/vim/vim/commit/307ac5c68e9e624ab713136d79f35bb73f780d2d --- src/nvim/screen.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/nvim/screen.c') diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 2b664cf5b0..7c71a440af 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -3543,6 +3543,10 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, xfree(p_extra_free); p_extra_free = p; for (i = 0; i < tab_len; i++) { + if (*p == NUL) { + tab_len = i; + break; + } int lcs = wp->w_p_lcs_chars.tab2; // if tab3 is given, need to change the char -- cgit