To: vim_dev@googlegroups.com Subject: Patch 8.1.2071 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.2071 Problem: When 'wincolor' is set text property changes highlighting. (Andy Stewart) Solution: Fix combining colors. (closes #4968) Files: src/drawline.c, src/testdir/test_highlight.vim, src/testdir/dumps/Test_wincolor_01.dump *** ../vim-8.1.2070/src/drawline.c 2019-09-20 17:00:05.443834632 +0200 --- src/drawline.c 2019-09-23 22:03:54.056238375 +0200 *************** *** 1367,1372 **** --- 1367,1373 ---- text_prop_attr = 0; text_prop_combine = FALSE; + text_prop_type = NULL; if (text_props_active > 0) { // Sort the properties on priority and/or starting last. *************** *** 1406,1413 **** # ifdef FEAT_TEXT_PROP else if (text_prop_type != NULL) { ! char_attr = hl_combine_attr( ! line_attr != 0 ? line_attr : win_attr, text_prop_attr); } # endif else if (line_attr != 0 && ((fromcol == -10 && tocol == MAXCOL) --- 1407,1417 ---- # ifdef FEAT_TEXT_PROP else if (text_prop_type != NULL) { ! char_attr = hl_combine_attr(line_attr != 0 ! ? line_attr ! : syntax_attr != 0 ! ? syntax_attr ! : win_attr, text_prop_attr); } # endif else if (line_attr != 0 && ((fromcol == -10 && tocol == MAXCOL) *** ../vim-8.1.2070/src/testdir/test_highlight.vim 2019-09-08 14:07:43.104866704 +0200 --- src/testdir/test_highlight.vim 2019-09-23 21:49:41.459678293 +0200 *************** *** 595,602 **** let lines =<< trim END set cursorline cursorcolumn rnu ! call setline(1, ["","1111111111","22222222222","3 here 3",""]) set wincolor=Pmenu /here END call writefile(lines, 'Xtest_wincolor') --- 595,607 ---- let lines =<< trim END set cursorline cursorcolumn rnu ! call setline(1, ["","1111111111","22222222222","3 here 3","","the cat is out of the bag"]) set wincolor=Pmenu + hi CatLine guifg=green ctermfg=green + hi Reverse gui=reverse cterm=reverse + syn match CatLine /^the.*/ + call prop_type_add("foo", {"highlight": "Reverse", "combine": 1}) + call prop_add(6, 12, {"type": "foo", "end_col": 15}) /here END call writefile(lines, 'Xtest_wincolor') *** ../vim-8.1.2070/src/testdir/dumps/Test_wincolor_01.dump 2019-09-14 21:00:01.387100866 +0200 --- src/testdir/dumps/Test_wincolor_01.dump 2019-09-23 22:04:04.792193206 +0200 *************** *** 1,8 **** | +0#af5f00255#ffd7ff255@1|2| | +0#0000001&@4| +0&#e0e0e08| +0&#ffd7ff255@64 ! | +0#af5f00255&@1|1| |1+0#0000001&@4|1+0#0000000#e0e0e08@4| | +0#0000001#ffd7ff255@59 ! | +8#af5f00255&@1|0| |2+0#0000000#e0e0e08@4>2+0#0000001#ffd7ff255@5| +8&&@59 | +0#af5f00255&@1|1| |3+0#0000001&| |h|e|r|e+0&#e0e0e08| +0&#ffd7ff255|3| @62 | +0#af5f00255&@1|2| | +0#0000001&@4| +0&#e0e0e08| +0&#ffd7ff255@64 |~+0#4040ff13&| @73 - |~| @73 |-+2#0000000#ffffff0@1| |V|I|S|U|A|L| |-@1| +0&&@34|2| @8|3|,|6| @10|A|l@1| --- 1,8 ---- | +0#af5f00255#ffd7ff255@1|2| | +0#0000001&@4| +0&#e0e0e08| +0&#ffd7ff255@64 ! | +0#af5f00255&@1|1| |1+0#0000001&@4|1+0&#e0e0e08@4| | +0&#ffd7ff255@59 ! | +8#af5f00255&@1|0| |2+0#0000001#e0e0e08@4>2+0&#ffd7ff255@5| +8&&@59 | +0#af5f00255&@1|1| |3+0#0000001&| |h|e|r|e+0&#e0e0e08| +0&#ffd7ff255|3| @62 | +0#af5f00255&@1|2| | +0#0000001&@4| +0&#e0e0e08| +0&#ffd7ff255@64 + | +0#af5f00255&@1|3| |t+0#40ff4011&|h|e| |c|a+0&#e0e0e08|t+0&#ffd7ff255| |i|s| |o+1&&|u|t| +0&&|o|f| |t|h|e| |b|a|g| +0#0000001&@45 |~+0#4040ff13&| @73 |-+2#0000000#ffffff0@1| |V|I|S|U|A|L| |-@1| +0&&@34|2| @8|3|,|6| @10|A|l@1| *** ../vim-8.1.2070/src/version.c 2019-09-23 21:16:51.387544361 +0200 --- src/version.c 2019-09-23 21:51:35.175246473 +0200 *************** *** 759,760 **** --- 759,762 ---- { /* Add new patch number below this line */ + /**/ + 2071, /**/ -- What the word 'politics' means: 'Poli' in Latin meaning 'many' and 'tics' meaning 'bloodsucking creatures'. /// 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 ///