aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/syntax.c
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2015-01-08 11:23:45 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2015-01-12 09:47:41 -0300
commit74c247f75baec5778296adf164831c5ffea0fb88 (patch)
tree1950d2681c1d659edf86477188020f04ea1492e6 /src/nvim/syntax.c
parenta8fe32040b039c134087c4c0d8c9e14bf50fef1a (diff)
downloadrneovim-74c247f75baec5778296adf164831c5ffea0fb88.tar.gz
rneovim-74c247f75baec5778296adf164831c5ffea0fb88.tar.bz2
rneovim-74c247f75baec5778296adf164831c5ffea0fb88.zip
ui: Add 'rgb' parameter to ui_attach
When set to false, nvim will send cterm color numbers with `highlight_set`.
Diffstat (limited to 'src/nvim/syntax.c')
-rw-r--r--src/nvim/syntax.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c
index 884a563fea..805f808449 100644
--- a/src/nvim/syntax.c
+++ b/src/nvim/syntax.c
@@ -6432,7 +6432,9 @@ do_highlight (
/* Use the _16 table to check if its a valid color name. */
color = color_numbers_16[i];
if (color >= 0) {
- if (t_colors == 8) {
+ if (abstract_ui) {
+ color = color_numbers_256[i];
+ } else if (t_colors == 8) {
/* t_Co is 8: use the 8 colors table */
#if defined(__QNXNTO__)
color = color_numbers_8_qansi[i];
@@ -6449,8 +6451,7 @@ do_highlight (
HL_TABLE()[idx].sg_cterm &= ~HL_BOLD;
}
color &= 7; /* truncate to 8 colors */
- } else if (abstract_ui || t_colors == 16 || t_colors == 88
- || t_colors == 256) {
+ } else if (t_colors == 16 || t_colors == 88 || t_colors == 256) {
/*
* Guess: if the termcap entry ends in 'm', it is
* probably an xterm-like terminal. Use the changed