diff src/syntax.c @ 12317:2a8890b80923 v8.0.1038

patch 8.0.1038: strike-through text not supported commit https://github.com/vim/vim/commit/cf4b00c856ef714482d8d060332ac9a4d74e6b88 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 2 18:33:56 2017 +0200 patch 8.0.1038: strike-through text not supported Problem: Strike-through text not supported. Solution: Add support for the "strikethrough" attribute. (Christian Brabandt, Ken Takata)
author Christian Brabandt <cb@256bit.org>
date Sat, 02 Sep 2017 18:45:04 +0200
parents 88ca0110abd5
children 972732a27d7c
line wrap: on
line diff
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -86,9 +86,9 @@ static int include_link = 0;	/* when 2 i
  */
 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;