diff options
| author | Michael Ennen <mike.ennen@gmail.com> | 2016-04-26 16:40:45 -0700 | 
|---|---|---|
| committer | Michael Ennen <mike.ennen@gmail.com> | 2016-05-17 11:30:08 -0700 | 
| commit | 087623aa3c49e4b66074ca5458ecc86069757080 (patch) | |
| tree | 7f00982b49e81d3d837e66e22e2fac69833e0eee /src/nvim/syntax.c | |
| parent | c9b1ad3a578ccc42c1b5a6ff58166590c349eed6 (diff) | |
| download | rneovim-087623aa3c49e4b66074ca5458ecc86069757080.tar.gz rneovim-087623aa3c49e4b66074ca5458ecc86069757080.tar.bz2 rneovim-087623aa3c49e4b66074ca5458ecc86069757080.zip | |
vim-patch: 7.4.1036
Problem:    Only terminals with up to 256 colors work properly.
Solution:   Use the 256 color behavior for all terminals with 256 or more
            colors. (Robert de Bath)
https://github.com/vim/vim/commit/fa03fd6c4a9fe05274d62ddefd645cb5801d2023
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];                  }                }              } | 
