To: vim-dev@vim.org Subject: Patch 5.5.025 Fcc: outbox From: Bram Moolenaar ------------ Patch 5.5.025 Problem: When using "keepend" in a syntax region, a contained match that includes the end-of-line could still force that region to continue, if there is another contained match in between. Solution: Check the keepend_level in check_state_ends(). Files: src/syntax.c *** ../vim-5.5.24/src/syntax.c Wed Sep 22 10:06:24 1999 --- src/syntax.c Sun Oct 17 15:26:06 1999 *************** *** 1704,1710 **** * Don't do this when "keepend" is used. */ if (SYN_ITEMS(syn_buf)[cur_si->si_idx].sp_type == SPTYPE_START ! && !(cur_si->si_flags & (HL_MATCH | HL_KEEPEND))) { update_si_end(cur_si, line, (int)current_col); if (current_next_flags & HL_HAS_EOL) --- 1704,1711 ---- * Don't do this when "keepend" is used. */ if (SYN_ITEMS(syn_buf)[cur_si->si_idx].sp_type == SPTYPE_START ! && !(cur_si->si_flags & (HL_MATCH | HL_KEEPEND)) ! && keepend_level < 0) { update_si_end(cur_si, line, (int)current_col); if (current_next_flags & HL_HAS_EOL) *** ../vim-5.5.24/src/version.c Sun Oct 17 15:00:38 1999 --- src/version.c Sun Oct 17 15:33:38 1999 *************** *** 420,420 **** --- 420,421 ---- { /* Add new patch number below this line */ + 25, -- MONK: ... and the Lord spake, saying, "First shalt thou take out the Holy Pin, then shalt thou count to three, no more, no less. Three shalt be the number thou shalt count, and the number of the counting shalt be three. Four shalt thou not count, neither count thou two, excepting that thou then proceed to three. Five is right out. Once the number three, being the third number, be reached, then lobbest thou thy Holy Hand Grenade of Antioch towards thou foe, who being naughty in my sight, shall snuff it. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\-- \ \ www.vim.org/iccf www.moolenaar.net www.vim.org / /