To: vim-dev@vim.org Subject: Patch 7.1.221 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 7.1.221 Problem: When inserting a "(", triggering the matchparen plugin, the following highlighting may be messed up. Solution: Before triggering the CursorMovedI autocommands update the display to update the stored syntax stacks for the change. Files: src/edit.c *** ../vim-7.1.220/src/edit.c Wed Jan 9 10:13:24 2008 --- src/edit.c Sat Jan 12 16:07:41 2008 *************** *** 1455,1460 **** --- 1455,1468 ---- # endif ) { + # ifdef FEAT_SYN_HL + /* Need to update the screen first, to make sure syntax + * highlighting is correct after making a change (e.g., inserting + * a "(". The autocommand may also require a redraw, so it's done + * again below, unfortunately. */ + if (syntax_present(curbuf) && must_redraw) + update_screen(0); + # endif apply_autocmds(EVENT_CURSORMOVEDI, NULL, NULL, FALSE, curbuf); last_cursormoved = curwin->w_cursor; } *** ../vim-7.1.220/src/version.c Sat Jan 12 17:11:25 2008 --- src/version.c Sat Jan 12 18:11:22 2008 *************** *** 668,669 **** --- 668,671 ---- { /* Add new patch number below this line */ + /**/ + 221, /**/ -- ROBIN: The what? ARTHUR: The Holy Hand Grenade of Antioch. 'Tis one of the sacred relics Brother Maynard always carries with him. ALL: Yes. Of course. ARTHUR: (shouting) Bring up the Holy Hand Grenade! "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///