To: vim_dev@googlegroups.com Subject: Patch 7.4.1141 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1141 Problem: Using searchpair() with a skip expression that uses syntax highlighting sometimes doesn't work. (David Fishburn) Solution: Reset next_match_idx. (Christian Brabandt) Files: src/syntax.c *** ../vim-7.4.1140/src/syntax.c 2016-01-05 22:04:25.741036054 +0100 --- src/syntax.c 2016-01-19 20:30:01.861654098 +0100 *************** *** 6474,6479 **** --- 6474,6485 ---- || lnum != current_lnum || col < current_col) syntax_start(wp, lnum); + else if (wp->w_buffer == syn_buf + && lnum == current_lnum + && col > current_col) + /* next_match may not be correct when moving around, e.g. with the + * "skip" expression in searchpair() */ + next_match_idx = -1; (void)get_syntax_attr(col, spellp, keep_state); *** ../vim-7.4.1140/src/version.c 2016-01-19 20:51:27.743756709 +0100 --- src/version.c 2016-01-19 20:52:30.147082737 +0100 *************** *** 743,744 **** --- 743,746 ---- { /* Add new patch number below this line */ + /**/ + 1141, /**/ -- The Feynman problem solving Algorithm: 1) Write down the problem 2) Think real hard 3) Write down the answer /// 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 ///