diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-09-02 18:33:56 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-09-02 18:33:56 +0200 |
commit | cf4b00c856ef714482d8d060332ac9a4d74e6b88 (patch) | |
tree | a17efb73ba6cffbdc8c17adbec2152ac41c35803 /src/syntax.c | |
parent | da22b8cc8b1b96fabd5a4c35c57b04a351340fb1 (diff) | |
download | vim-git-cf4b00c856ef714482d8d060332ac9a4d74e6b88.tar.gz |
patch 8.0.1038: strike-through text not supportedv8.0.1038
Problem: Strike-through text not supported.
Solution: Add support for the "strikethrough" attribute. (Christian
Brabandt, Ken Takata)
Diffstat (limited to 'src/syntax.c')
-rw-r--r-- | src/syntax.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/syntax.c b/src/syntax.c index 730357520..00e292932 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -86,9 +86,9 @@ static int include_link = 0; /* when 2 include "link" and "clear" */ */ static char *(hl_name_table[]) = {"bold", "standout", "underline", "undercurl", - "italic", "reverse", "inverse", "nocombine", "NONE"}; + "italic", "reverse", "inverse", "nocombine", "strikethrough", "NONE"}; static int hl_attr_table[] = - {HL_BOLD, HL_STANDOUT, HL_UNDERLINE, HL_UNDERCURL, HL_ITALIC, HL_INVERSE, HL_INVERSE, HL_NOCOMBINE, 0}; + {HL_BOLD, HL_STANDOUT, HL_UNDERLINE, HL_UNDERCURL, HL_ITALIC, HL_INVERSE, HL_INVERSE, HL_NOCOMBINE, HL_STRIKETHROUGH, 0}; #define ATTR_COMBINE(attr_a, attr_b) ((((attr_b) & HL_NOCOMBINE) ? attr_b : (attr_a)) | (attr_b)) static int get_attr_entry(garray_T *table, attrentry_T *aep); @@ -9951,6 +9951,8 @@ highlight_changed(void) break; case 'c': attr |= HL_UNDERCURL; break; + case 't': attr |= HL_STRIKETHROUGH; + break; case ':': ++p; /* highlight group name */ if (attr || *p == NUL) /* no combinations */ return FAIL; |