diff options
author | Shougo Matsushita <Shougo.Matsu@gmail.com> | 2016-11-22 07:31:40 +0900 |
---|---|---|
committer | Shougo Matsushita <Shougo.Matsu@gmail.com> | 2016-11-24 07:07:22 +0900 |
commit | 5c06f350cee4d52554194a90e1d070f4f53979d3 (patch) | |
tree | f57c6876c972c5897afef44902ed0db39cd6afef | |
parent | 5f0260808cf3712718555ee177476b8aefd78280 (diff) | |
download | rneovim-5c06f350cee4d52554194a90e1d070f4f53979d3.tar.gz rneovim-5c06f350cee4d52554194a90e1d070f4f53979d3.tar.bz2 rneovim-5c06f350cee4d52554194a90e1d070f4f53979d3.zip |
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)
https://github.com/vim/vim/commit/b681be175b6991cdc2b8ddd49b0e97e3fe2b201e
-rw-r--r-- | src/nvim/syntax.c | 4 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index e57965ac2c..cd37bde3cb 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -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; diff --git a/src/nvim/version.c b/src/nvim/version.c index 8f3619f1e8..8684d840d9 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -753,7 +753,7 @@ static int included_patches[] = { // 1694 NA // 1693 NA // 1692, - // 1691, + 1691, // 1690 NA // 1689 NA // 1688 NA |