mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
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)
This commit is contained in:
@@ -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
|
* Also do this when a change was made, the current state may be invalid
|
||||||
* then.
|
* 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();
|
invalidate_current_state();
|
||||||
syn_buf = wp->w_buffer;
|
syn_buf = wp->w_buffer;
|
||||||
|
@@ -748,6 +748,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1691,
|
||||||
/**/
|
/**/
|
||||||
1690,
|
1690,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user