To: vim-dev@vim.org Subject: Patch 7.2b.030 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 7.2b.030 Problem: When changing the value of t_Co from 8 to 16 the Visual highlighting keeps both reverse and a background color. Solution: Remove the attribute when setting the default highlight color. (Markus Heidelberg) Files: src/syntax.c *** ../vim-7.2b.029/src/syntax.c Wed Jun 25 00:17:00 2008 --- src/syntax.c Mon Aug 4 23:07:11 2008 *************** *** 6459,6471 **** /* Reverse looks ugly, but grey may not work for 8 colors. Thus let it * depend on the number of colors available. * With 8 colors brown is equal to yellow, need to use black for Search fg ! * to avoid Statement highlighted text disappears. */ if (t_colors > 8) ! do_highlight((char_u *)(*p_bg == 'l' ? "Visual ctermbg=LightGrey" ! : "Visual ctermbg=DarkGrey"), FALSE, TRUE); else { ! do_highlight((char_u *)"Visual cterm=reverse", FALSE, TRUE); if (*p_bg == 'l') do_highlight((char_u *)"Search ctermfg=black", FALSE, TRUE); } --- 6459,6474 ---- /* Reverse looks ugly, but grey may not work for 8 colors. Thus let it * depend on the number of colors available. * With 8 colors brown is equal to yellow, need to use black for Search fg ! * to avoid Statement highlighted text disappears. ! * Clear the attributes, needed when changing the t_Co value. */ if (t_colors > 8) ! do_highlight((char_u *)(*p_bg == 'l' ! ? "Visual cterm=NONE ctermbg=LightGrey" ! : "Visual cterm=NONE ctermbg=DarkGrey"), FALSE, TRUE); else { ! do_highlight((char_u *)"Visual cterm=reverse ctermbg=NONE", ! FALSE, TRUE); if (*p_bg == 'l') do_highlight((char_u *)"Search ctermfg=black", FALSE, TRUE); } *** ../vim-7.2b.029/src/version.c Wed Aug 6 15:02:09 2008 --- src/version.c Wed Aug 6 15:26:47 2008 *************** *** 678,679 **** --- 678,681 ---- { /* Add new patch number below this line */ + /**/ + 30, /**/ -- BROTHER MAYNARD: Armaments Chapter Two Verses Nine to Twenty One. ANOTHER MONK: And St. Attila raised his hand grenade up on high saying "O Lord bless this thy hand grenade that with it thou mayest blow thine enemies to tiny bits, in thy mercy. "and the Lord did grin and people did feast upon the lambs and sloths and carp and anchovies and orang-utans and breakfast cereals and fruit bats and... BROTHER MAYNARD: Skip a bit brother ... "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 ///