To: vim_dev@googlegroups.com Subject: Patch 8.1.1170 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.1170 Problem: Terminal ANSI color test does not cover all colors. Solution: Use the color number, the name is not always resulting in an ANSI color when t_Co is 256. Files: src/testdir/test_terminal.vim, src/testdir/dumps/Test_terminal_all_ansi_colors.dump *** ../vim-8.1.1169/src/testdir/test_terminal.vim 2019-04-13 20:38:53.745034749 +0200 --- src/testdir/test_terminal.vim 2019-04-13 23:14:17.605577009 +0200 *************** *** 1492,1513 **** " Use all the ANSI colors. call writefile([ \ 'call setline(1, "AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPP")', ! \ 'hi Tblack ctermfg=Black ctermbg=Lightgrey', ! \ 'hi Tdarkred ctermfg=Darkred ctermbg=Red', ! \ 'hi Tdarkgreen ctermfg=Darkgreen ctermbg=Green', ! \ 'hi Tbrown ctermfg=Brown ctermbg=Yellow', ! \ 'hi Tdarkblue ctermfg=Darkblue ctermbg=Blue', ! \ 'hi Tdarkmagenta ctermfg=Darkmagenta ctermbg=Magenta', ! \ 'hi Tdarkcyan ctermfg=Darkcyan ctermbg=Cyan', ! \ 'hi Tlightgrey ctermfg=Lightgrey ctermbg=Black', ! \ 'hi Tdarkgrey ctermfg=Darkgrey ctermbg=White', ! \ 'hi Tred ctermfg=Red ctermbg=Darkred', ! \ 'hi Tgreen ctermfg=Green ctermbg=Darkgreen', ! \ 'hi Tyellow ctermfg=Yellow ctermbg=Brown', ! \ 'hi Tblue ctermfg=Blue ctermbg=Darkblue', ! \ 'hi Tmagenta ctermfg=Magenta ctermbg=Darkmagenta', ! \ 'hi Tcyan ctermfg=Cyan ctermbg=Darkcyan', ! \ 'hi Twhite ctermfg=White ctermbg=Darkgrey', \ '', \ 'call matchadd("Tblack", "A")', \ 'call matchadd("Tdarkred", "B")', --- 1492,1513 ---- " Use all the ANSI colors. call writefile([ \ 'call setline(1, "AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPP")', ! \ 'hi Tblack ctermfg=0 ctermbg=8', ! \ 'hi Tdarkred ctermfg=1 ctermbg=9', ! \ 'hi Tdarkgreen ctermfg=2 ctermbg=10', ! \ 'hi Tbrown ctermfg=3 ctermbg=11', ! \ 'hi Tdarkblue ctermfg=4 ctermbg=12', ! \ 'hi Tdarkmagenta ctermfg=5 ctermbg=13', ! \ 'hi Tdarkcyan ctermfg=6 ctermbg=14', ! \ 'hi Tlightgrey ctermfg=7 ctermbg=15', ! \ 'hi Tdarkgrey ctermfg=8 ctermbg=0', ! \ 'hi Tred ctermfg=9 ctermbg=1', ! \ 'hi Tgreen ctermfg=10 ctermbg=2', ! \ 'hi Tyellow ctermfg=11 ctermbg=3', ! \ 'hi Tblue ctermfg=12 ctermbg=4', ! \ 'hi Tmagenta ctermfg=13 ctermbg=5', ! \ 'hi Tcyan ctermfg=14 ctermbg=6', ! \ 'hi Twhite ctermfg=15 ctermbg=7', \ '', \ 'call matchadd("Tblack", "A")', \ 'call matchadd("Tdarkred", "B")', *** ../vim-8.1.1169/src/testdir/dumps/Test_terminal_all_ansi_colors.dump 2019-04-13 13:13:50.837638962 +0200 --- src/testdir/dumps/Test_terminal_all_ansi_colors.dump 2019-04-13 23:14:40.085509427 +0200 *************** *** 1,4 **** ! >A+0#0000001#e0e0e08@1|B+0#e000002#ff404010@1|C+0#00e0003#40ff4011@1|D+0#af5f00255#ffff4012@1|E+0#0000e05#4040ff13@1|F+0#e000e06#ff40ff14@1|G+0#00e0e07#40ffff15@1|H+0#e0e0e08#0000001@1|I+0#6c6c6c255#ffffff16@1|J+0#ff404010#e000002@1|K+0#40ff4011#00e0003@1|L+0#ffff4012#af5f00255@1|M+0#4040ff13#0000e05@1|N+0#ff40ff14#e000e06@1|O+0#40ffff15#00e0e07@1|P+0#ffffff16#6c6c6c255@1| +0#0000000#ffffff0@42 @2| +0#4040ff13&@72 |~| @73 |~| @73 --- 1,4 ---- ! >A+0#0000001#8080809@1|B+0#e000002#ff404010@1|C+0#00e0003#40ff4011@1|D+0#e0e0004#ffff4012@1|E+0#0000e05#4040ff13@1|F+0#e000e06#ff40ff14@1|G+0#00e0e07#40ffff15@1|H+0#e0e0e08#ffffff16@1|I+0#8080809#0000001@1|J+0#ff404010#e000002@1|K+0#40ff4011#00e0003@1|L+0#ffff4012#e0e0004@1|M+0#4040ff13#0000e05@1|N+0#ff40ff14#e000e06@1|O+0#40ffff15#00e0e07@1|P+0#ffffff16#e0e0e08@1| +0#0000000#ffffff0@42 @2| +0#4040ff13&@72 |~| @73 |~| @73 *** ../vim-8.1.1169/src/version.c 2019-04-13 22:44:48.325154165 +0200 --- src/version.c 2019-04-13 23:17:36.124879899 +0200 *************** *** 773,774 **** --- 773,776 ---- { /* Add new patch number below this line */ + /**/ + 1170, /**/ -- We're knights of the round table We dance whene'er we're able We do routines and chorus scenes With footwork impeccable. We dine well here in Camelot We eat ham and jam and spam a lot. "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/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///