diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-05-19 09:06:04 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-05-19 09:06:04 -0400 |
commit | 509089d0533c250d1a1268eb637d3413209b1da6 (patch) | |
tree | ddf2f103329268979accb3b66d12c4c01485a7ee /src/nvim/syntax.c | |
parent | 9c7038c4757351bbeb1e9e6615ec833d3c7dfb4e (diff) | |
parent | 087623aa3c49e4b66074ca5458ecc86069757080 (diff) | |
download | rneovim-509089d0533c250d1a1268eb637d3413209b1da6.tar.gz rneovim-509089d0533c250d1a1268eb637d3413209b1da6.tar.bz2 rneovim-509089d0533c250d1a1268eb637d3413209b1da6.zip |
Merge pull request #4657 from brcolow/vim-7.4.1036
vim-patch: 7.4.1036
Diffstat (limited to 'src/nvim/syntax.c')
-rw-r--r-- | src/nvim/syntax.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index b04180ad1c..765207928a 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -6370,18 +6370,14 @@ do_highlight ( } else HL_TABLE()[idx].sg_cterm &= ~HL_BOLD; } - color &= 7; /* truncate to 8 colors */ - } else if (t_colors == 16 || t_colors == 88 || t_colors == 256) { - switch (t_colors) { - case 16: - color = color_numbers_8[i]; - break; - case 88: - color = color_numbers_88[i]; - break; - case 256: - color = color_numbers_256[i]; - break; + color &= 7; // truncate to 8 colors + } else if (t_colors == 16 || t_colors == 88 || t_colors >= 256) { + if (t_colors == 88) { + color = color_numbers_88[i]; + } else if (t_colors >= 256) { + color = color_numbers_256[i]; + } else { + color = color_numbers_8[i]; } } } |