Mercurial > vim
diff src/libvterm/src/pen.c @ 30884:ac9464a32606 v9.0.0776
patch 9.0.0776: MSVC can't have field name "small"
Commit: https://github.com/vim/vim/commit/9d8620b519a84983bc8c24cb6c302f4d6b55a6c0
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Oct 16 20:24:16 2022 +0100
patch 9.0.0776: MSVC can't have field name "small"
Problem: MSVC can't have field name "small".
Solution: Rename small to smallfont.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 16 Oct 2022 21:30:06 +0200 |
parents | 82336c3b679d |
children | bf4f25d50fdd |
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.small = 0; setpenattr_bool(state, VTERM_ATTR_SMALL, 0); + state->pen.smallfont = 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.small); + setpenattr_bool(state, VTERM_ATTR_SMALL, state->pen.smallfont); 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.small = (arg != 75); + state->pen.smallfont = (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.small); + setpenattr_bool(state, VTERM_ATTR_SMALL, state->pen.smallfont); 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.small) { + if(state->pen.smallfont) { 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.small; + val->boolean = state->pen.smallfont; return 1; case VTERM_ATTR_BASELINE: