From 3d3545bbc17627a46ee85ce8e85bdd75523c3982 Mon Sep 17 00:00:00 2001 From: Shougo Date: Mon, 2 Jan 2017 00:07:49 +0900 Subject: [PATCH] vim-patch:7.4.1834 (#5854) Problem: Possible crash when conceal is active. Solution: Check for the screen to be valid when redrawing a line. https://github.com/vim/vim/commit/908be438794619f10ef7fa25e24e5893b2ae0189 --- src/nvim/screen.c | 5 +++++ src/nvim/version.c | 1 + 2 files changed, 6 insertions(+) diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 50517d2829..bf6e316c06 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -486,6 +486,11 @@ void update_single_line(win_T *wp, linenr_T lnum) int row; int j; + // Don't do anything if the screen structures are (not yet) valid. + if (!screen_valid(true)) { + return; + } + if (lnum >= wp->w_topline && lnum < wp->w_botline && foldedCount(wp, lnum, &win_foldinfo) == 0) { row = 0; diff --git a/src/nvim/version.c b/src/nvim/version.c index be17b6775a..cfe71c5015 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -606,6 +606,7 @@ static int included_patches[] = { 1837, 1836, 1835, + 1834, 1833, 1832, 1831,