summaryrefslogtreecommitdiffstats
path: root/src/screen.c
diff options
context:
space:
mode:
authorPMunch <peterme@peterme.net>2023-11-15 15:35:49 +0100
committerChristian Brabandt <cb@256bit.org>2024-01-15 22:27:35 +0100
commita606f3ac036e5f3dc313f620e6b4bc00812314f9 (patch)
treec27363e3163007004f8838482137a5db5bf28630 /src/screen.c
parenteb3475df0d927a178789cf8e7fc4983932e1cdbe (diff)
patch 9.1.0030: Cannot use terminal alternate fontv9.1.0030
Problem: Cannot use terminal alternate fonts (PMunch) Solution: Support terminal alternate fonts using CSI SGR 10-20 and t_CF code (PMunch) Add support for alternate font highlighting This adds support for alternate font highlighting using CSI SGR 10-20. Few terminals currently support this, but with added tool support this should improve over time. The change here is more or less taken from how colors are configured and applied, but there might be some parts I missed while implementing it. Changing fonts is done through the new `:hi ctermfont` attribute which takes a number, 0 is the normal font, and the numbers 1-9 select an "alternative" font. Which fonts are in use is up to the terminal. fixes: #13513 closes: #13537 Signed-off-by: PMunch <peterme@peterme.net> Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/screen.c')
-rw-r--r--src/screen.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/screen.c b/src/screen.c
index ac24a16464..ef43cfc8de 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -1667,6 +1667,8 @@ screen_start_highlight(int attr)
*/
if (aep != NULL)
{
+ if (aep->ae_u.cterm.font > 0 && aep->ae_u.cterm.font < 12)
+ term_font(aep->ae_u.cterm.font);
#ifdef FEAT_TERMGUICOLORS
// When 'termguicolors' is set but fg or bg is unset,
// fall back to the cterm colors. This helps for SpellBad,