# HG changeset patch # User Christian Brabandt # Date 1459458905 -7200 # Node ID 8fff73f17ff1841c6a73320af8ace120232f392b # Parent 6d8b4fe96454854b43b32a02b92dd1689098a991 commit https://github.com/vim/vim/commit/b681be175b6991cdc2b8ddd49b0e97e3fe2b201e Author: Bram Moolenaar Date: Thu Mar 31 23:02:16 2016 +0200 patch 7.4.1691 Problem: When switching to a new buffer and an autocommand applies syntax highlighting an ml_get error may occur. Solution: Check "syn_buf" against the buffer in the window. (Alexander von Buddenbrock, closes #676) diff --git a/src/syntax.c b/src/syntax.c --- a/src/syntax.c +++ b/src/syntax.c @@ -509,7 +509,9 @@ syntax_start(win_T *wp, linenr_T lnum) * Also do this when a change was made, the current state may be invalid * then. */ - if (syn_block != wp->w_s || changedtick != syn_buf->b_changedtick) + if (syn_block != wp->w_s + || syn_buf != wp->w_buffer + || changedtick != syn_buf->b_changedtick) { invalidate_current_state(); syn_buf = wp->w_buffer; diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -749,6 +749,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1691, +/**/ 1690, /**/ 1689,