To: vim_dev@googlegroups.com Subject: Patch 7.4.1691 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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) Files: src/syntax.c *** ../vim-7.4.1690/src/syntax.c 2016-03-19 22:11:47.432674878 +0100 --- src/syntax.c 2016-03-31 23:01:35.735132239 +0200 *************** *** 509,515 **** * 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) { invalidate_current_state(); syn_buf = wp->w_buffer; --- 509,517 ---- * Also do this when a change was made, the current state may be invalid * then. */ ! if (syn_block != wp->w_s ! || syn_buf != wp->w_buffer ! || changedtick != syn_buf->b_changedtick) { invalidate_current_state(); syn_buf = wp->w_buffer; *** ../vim-7.4.1690/src/version.c 2016-03-31 22:27:36.660109374 +0200 --- src/version.c 2016-03-31 23:00:11.148001625 +0200 *************** *** 750,751 **** --- 750,753 ---- { /* Add new patch number below this line */ + /**/ + 1691, /**/ -- If Microsoft would build a car... ... You'd have to press the "Start" button to turn the engine off. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///