'listchars': Whitespace highlight group #6367

This commit is contained in:
Yichao Zhou
2017-03-26 03:15:52 -07:00
committed by Justin M. Keyes
parent 6afa7d66cd
commit bc6d868d00
9 changed files with 93 additions and 132 deletions

View File

@@ -464,6 +464,7 @@ typedef enum {
, HLF_CUL // 'cursurline'
, HLF_MC // 'colorcolumn'
, HLF_QFL // selected quickfix line
, HLF_0 // Whitespace
, HLF_COUNT // MUST be the last one
} hlf_T;
@@ -472,7 +473,7 @@ typedef enum {
#define HL_FLAGS { '8', '~', 'z', 'Z', '@', 'd', 'e', 'i', 'l', 'm', 'M', 'n', \
'N', 'r', 's', 'S', 'c', 't', 'v', 'V', 'w', 'W', 'f', 'F', \
'A', 'C', 'D', 'T', '-', '>', 'B', 'P', 'R', 'L', '+', '=', \
'x', 'X', '*', '#', '_', '!', '.', 'o', 'q' }
'x', 'X', '*', '#', '_', '!', '.', 'o', 'q', '0' }
EXTERN int highlight_attr[HLF_COUNT]; /* Highl. attr for each context. */
EXTERN int highlight_user[9]; /* User[1-9] attributes */

View File

@@ -245,7 +245,8 @@ typedef struct vimoption {
"A:DiffAdd,C:DiffChange,D:DiffDelete,T:DiffText,>:SignColumn,-:Conceal," \
"B:SpellBad,P:SpellCap,R:SpellRare,L:SpellLocal,+:Pmenu,=:PmenuSel," \
"x:PmenuSbar,X:PmenuThumb,*:TabLine,#:TabLineSel,_:TabLineFill," \
"!:CursorColumn,.:CursorLine,o:ColorColumn,q:QuickFixLine"
"!:CursorColumn,.:CursorLine,o:ColorColumn,q:QuickFixLine," \
"0:Whitespace"
/*
* options[] is initialized here.

View File

@@ -3409,7 +3409,7 @@ win_line (
|| (c == ' ' && lcs_space && ptr - line <= trailcol))) {
c = (c == ' ') ? lcs_space : lcs_nbsp;
n_attr = 1;
extra_attr = hl_attr(HLF_8);
extra_attr = hl_attr(HLF_0);
saved_attr2 = char_attr; // save current attr
mb_c = c;
if (enc_utf8 && (*mb_char2len)(c) > 1) {
@@ -3424,7 +3424,7 @@ win_line (
if (trailcol != MAXCOL && ptr > line + trailcol && c == ' ') {
c = lcs_trail;
n_attr = 1;
extra_attr = hl_attr(HLF_8);
extra_attr = hl_attr(HLF_0);
saved_attr2 = char_attr; // save current attr
mb_c = c;
if (enc_utf8 && (*mb_char2len)(c) > 1) {
@@ -3525,8 +3525,8 @@ win_line (
c_extra = lcs_tab2;
}
n_attr = tab_len + 1;
extra_attr = hl_attr(HLF_8);
saved_attr2 = char_attr; /* save current attr */
extra_attr = hl_attr(HLF_0);
saved_attr2 = char_attr; // save current attr
mb_c = c;
if (enc_utf8 && (*mb_char2len)(c) > 1) {
mb_utf8 = TRUE;

View File

@@ -5916,6 +5916,7 @@ static char *highlight_init_both[] =
"default link EndOfBuffer NonText",
"default link QuickFixLine Search",
"default link Substitute Search",
"default link Whitespace NonText",
NULL
};