Mercurial > vim
diff src/screen.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 | 1ff5e5dfa9b0 |
children | 4dba3e4f3b01 |
line wrap: on
line diff
--- a/src/screen.c +++ b/src/screen.c @@ -235,7 +235,7 @@ redraw_later_clear(void) else #endif /* Use attributes that is very unlikely to appear in text. */ - screen_attr = HL_BOLD | HL_UNDERLINE | HL_INVERSE; + screen_attr = HL_BOLD | HL_UNDERLINE | HL_INVERSE | HL_STRIKETHROUGH; } /* @@ -8086,6 +8086,8 @@ screen_start_highlight(int attr) out_str(T_CZH); if ((attr & HL_INVERSE) && T_MR != NULL) /* inverse (reverse) */ out_str(T_MR); + if ((attr & HL_STRIKETHROUGH) && T_STS != NULL) /* strike */ + out_str(T_STS); /* * Output the color or start string after bold etc., in case the @@ -8210,6 +8212,13 @@ screen_stop_highlight(void) else out_str(T_CZR); } + if (screen_attr & HL_STRIKETHROUGH) + { + if (STRCMP(T_STE, T_ME) == 0) + do_ME = TRUE; + else + out_str(T_STE); + } if (do_ME || (screen_attr & (HL_BOLD | HL_INVERSE))) out_str(T_ME);