diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-04-13 23:18:21 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-04-13 23:18:21 +0200 |
commit | a0aaf3c4df60d3f86995d72460c4cf97e35775c3 (patch) | |
tree | 7d4baf2fdc4e65d0b6b12dfe28efa1049a56240c /src | |
parent | 837854d1bc01d91ff463a2cfdf8aec9b89d5fbd1 (diff) |
patch 8.1.1170: terminal ANSI color test does not cover all colorsv8.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.
Diffstat (limited to 'src')
-rw-r--r-- | src/testdir/dumps/Test_terminal_all_ansi_colors.dump | 2 | ||||
-rw-r--r-- | src/testdir/test_terminal.vim | 32 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 19 insertions, 17 deletions
diff --git a/src/testdir/dumps/Test_terminal_all_ansi_colors.dump b/src/testdir/dumps/Test_terminal_all_ansi_colors.dump index 40e3ad900f..232f60d848 100644 --- a/src/testdir/dumps/Test_terminal_all_ansi_colors.dump +++ b/src/testdir/dumps/Test_terminal_all_ansi_colors.dump @@ -1,4 +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 +>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 diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim index f81bcd3212..be771b4a10 100644 --- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -1492,22 +1492,22 @@ func Test_terminal_all_ansi_colors() " 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', + \ '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")', diff --git a/src/version.c b/src/version.c index 367b170a16..475f828eeb 100644 --- a/src/version.c +++ b/src/version.c @@ -772,6 +772,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1170, +/**/ 1169, /**/ 1168, |