vim-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 vim/vim#676)

b681be175b
This commit is contained in:
Shougo Matsushita 2016-11-22 07:31:40 +09:00
parent 5f0260808c
commit 5c06f350ce
2 changed files with 4 additions and 2 deletions

View File

@ -392,7 +392,9 @@ void 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;
syn_block = wp->w_s;

View File

@ -753,7 +753,7 @@ static int included_patches[] = {
// 1694 NA
// 1693 NA
// 1692,
// 1691,
1691,
// 1690 NA
// 1689 NA
// 1688 NA