Mercurial > vim
diff src/libvterm/src/screen.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/screen.c +++ b/src/libvterm/src/screen.c @@ -26,7 +26,7 @@ typedef struct unsigned int conceal : 1; unsigned int strike : 1; unsigned int font : 4; /* 0 to 9 */ - unsigned int small : 1; + unsigned int smallfont : 1; unsigned int baseline : 2; /* Extra state storage that isn't strictly pen-related */ @@ -446,7 +446,7 @@ static int setpenattr(VTermAttr attr, VT screen->pen.bg = val->color; return 1; case VTERM_ATTR_SMALL: - screen->pen.small = val->boolean; + screen->pen.smallfont = val->boolean; return 1; case VTERM_ATTR_BASELINE: screen->pen.baseline = val->number; @@ -700,7 +700,7 @@ static void resize_buffer(VTermScreen *s dst->pen.conceal = src->attrs.conceal; dst->pen.strike = src->attrs.strike; dst->pen.font = src->attrs.font; - dst->pen.small = src->attrs.small; + dst->pen.smallfont = src->attrs.smallfont; dst->pen.baseline = src->attrs.baseline; dst->pen.fg = src->fg; @@ -1014,7 +1014,7 @@ int vterm_screen_get_cell(const VTermScr cell->attrs.conceal = intcell->pen.conceal; cell->attrs.strike = intcell->pen.strike; cell->attrs.font = intcell->pen.font; - cell->attrs.small = intcell->pen.small; + cell->attrs.smallfont = intcell->pen.smallfont; cell->attrs.baseline = intcell->pen.baseline; cell->attrs.dwl = intcell->pen.dwl; @@ -1158,7 +1158,7 @@ static int attrs_differ(VTermAttrMask at return 1; if((attrs & VTERM_ATTR_BACKGROUND_MASK) && !vterm_color_is_equal(&a->pen.bg, &b->pen.bg)) return 1; - if((attrs & VTERM_ATTR_SMALL_MASK) && (a->pen.small != b->pen.small)) + if((attrs & VTERM_ATTR_SMALL_MASK) && (a->pen.smallfont != b->pen.smallfont)) return 1; if((attrs & VTERM_ATTR_BASELINE_MASK) && (a->pen.baseline != b->pen.baseline)) return 1;