diff options
Diffstat (limited to 'src/nvim/tui/tui.c')
-rw-r--r-- | src/nvim/tui/tui.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c index bfebe0442d..72a25b0b59 100644 --- a/src/nvim/tui/tui.c +++ b/src/nvim/tui/tui.c @@ -450,7 +450,8 @@ static void update_attrs(UI *ui, HlAttrs attrs) int attr = ui->rgb ? attrs.rgb_ae_attr : attrs.cterm_ae_attr; bool bold = attr & HL_BOLD; bool italic = attr & HL_ITALIC; - bool reverse = attr & (HL_INVERSE | HL_STANDOUT); + bool reverse = attr & HL_INVERSE; + bool standout = attr & HL_STANDOUT; bool underline = attr & (HL_UNDERLINE), undercurl = attr & (HL_UNDERCURL); if (unibi_get_str(data->ut, unibi_set_attributes)) { @@ -478,6 +479,9 @@ static void update_attrs(UI *ui, HlAttrs attrs) if (underline || undercurl) { unibi_out(ui, unibi_enter_underline_mode); } + if (standout) { + unibi_out(ui, unibi_enter_standout_mode); + } if (reverse) { unibi_out(ui, unibi_enter_reverse_mode); } @@ -826,7 +830,7 @@ static void tui_cursor_goto(UI *ui, Integer row, Integer col) CursorShape tui_cursor_decode_shape(const char *shape_str) { - CursorShape shape = 0; + CursorShape shape; if (strequal(shape_str, "block")) { shape = SHAPE_BLOCK; } else if (strequal(shape_str, "vertical")) { @@ -834,7 +838,8 @@ CursorShape tui_cursor_decode_shape(const char *shape_str) } else if (strequal(shape_str, "horizontal")) { shape = SHAPE_HOR; } else { - EMSG2(_(e_invarg2), shape_str); + WLOG("Unknown shape value '%s'", shape_str); + shape = SHAPE_BLOCK; } return shape; } @@ -920,7 +925,6 @@ static void tui_set_mode(UI *ui, ModeShape mode) } TUIData *data = ui->data; cursorentry_T c = data->cursor_shapes[mode]; - int shape = c.shape; if (c.id != 0 && ui->rgb) { int attr = syn_id2attr(c.id); @@ -931,11 +935,12 @@ static void tui_set_mode(UI *ui, ModeShape mode) } } - switch (shape) { + int shape; + switch (c.shape) { + default: abort(); break; case SHAPE_BLOCK: shape = 1; break; case SHAPE_HOR: shape = 3; break; case SHAPE_VER: shape = 5; break; - default: WLOG("Unknown shape value %d", shape); break; } UNIBI_SET_NUM_VAR(data->params[0], shape + (int)(c.blinkon == 0)); unibi_out_ext(ui, data->unibi_ext.set_cursor_style); |