Mercurial > vim
diff src/libvterm/src/pen.c @ 30894:bf4f25d50fdd v9.0.0781
patch 9.0.0781: workaround to rename "small" to "smallfont" is clumsy
Commit: https://github.com/vim/vim/commit/e6a16e9950111adfcfdb85261b3d5a8c13f1d533
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Oct 17 14:51:36 2022 +0100
patch 9.0.0781: workaround to rename "small" to "smallfont" is clumsy
Problem: Workaround to rename "small" to "smallfont" is clumsy.
Solution: Undefine "small" after including windows.h. (Ken Takata)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 17 Oct 2022 16:00:04 +0200 |
parents | ac9464a32606 |
children | b13f723a7ec6 |
line wrap: on
line diff
--- a/src/libvterm/src/pen.c +++ b/src/libvterm/src/pen.c @@ -181,7 +181,7 @@ INTERNAL void vterm_state_resetpen(VTerm state->pen.conceal = 0; setpenattr_bool(state, VTERM_ATTR_CONCEAL, 0); state->pen.strike = 0; setpenattr_bool(state, VTERM_ATTR_STRIKE, 0); state->pen.font = 0; setpenattr_int (state, VTERM_ATTR_FONT, 0); - state->pen.smallfont = 0; setpenattr_bool(state, VTERM_ATTR_SMALL, 0); + state->pen.small = 0; setpenattr_bool(state, VTERM_ATTR_SMALL, 0); state->pen.baseline = 0; setpenattr_int (state, VTERM_ATTR_BASELINE, 0); state->pen.fg = state->default_fg; setpenattr_col(state, VTERM_ATTR_FOREGROUND, state->default_fg); @@ -204,7 +204,7 @@ INTERNAL void vterm_state_savepen(VTermS setpenattr_bool(state, VTERM_ATTR_CONCEAL, state->pen.conceal); setpenattr_bool(state, VTERM_ATTR_STRIKE, state->pen.strike); setpenattr_int (state, VTERM_ATTR_FONT, state->pen.font); - setpenattr_bool(state, VTERM_ATTR_SMALL, state->pen.smallfont); + setpenattr_bool(state, VTERM_ATTR_SMALL, state->pen.small); setpenattr_int (state, VTERM_ATTR_BASELINE, state->pen.baseline); setpenattr_col( state, VTERM_ATTR_FOREGROUND, state->pen.fg); @@ -454,12 +454,12 @@ INTERNAL void vterm_state_setpen(VTermSt case 73: // Superscript case 74: // Subscript case 75: // Superscript/subscript off - state->pen.smallfont = (arg != 75); + state->pen.small = (arg != 75); state->pen.baseline = (arg == 73) ? VTERM_BASELINE_RAISE : (arg == 74) ? VTERM_BASELINE_LOWER : VTERM_BASELINE_NORMAL; - setpenattr_bool(state, VTERM_ATTR_SMALL, state->pen.smallfont); + setpenattr_bool(state, VTERM_ATTR_SMALL, state->pen.small); setpenattr_int (state, VTERM_ATTR_BASELINE, state->pen.baseline); break; @@ -560,7 +560,7 @@ INTERNAL int vterm_state_getpen(VTermSta argi = vterm_state_getpen_color(&state->pen.bg, argi, args, FALSE); - if(state->pen.smallfont) { + if(state->pen.small) { if(state->pen.baseline == VTERM_BASELINE_RAISE) args[argi++] = 73; else if(state->pen.baseline == VTERM_BASELINE_LOWER) @@ -614,7 +614,7 @@ int vterm_state_get_penattr(const VTermS return 1; case VTERM_ATTR_SMALL: - val->boolean = state->pen.smallfont; + val->boolean = state->pen.small; return 1; case VTERM_ATTR_BASELINE: