Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions vtemu/vt_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -4264,7 +4264,7 @@ static void set_vtmode(vt_parser_t *vt_parser, int mode, int flag) {
/* WYSTCURM */
if (flag) {
vt_parser->cursor_style &= ~CS_BLINK;
} else {
} else if (vt_parser->blink_cursor) {
vt_parser->cursor_style |= CS_BLINK;
}
break;
Expand Down Expand Up @@ -5307,15 +5307,15 @@ inline static int parse_vt100_escape_sequence(
/* "CSI SP q" DECSCUSR */

if (ps[0] < 2) {
vt_parser->cursor_style = CS_BLOCK|CS_BLINK;
vt_parser->cursor_style = vt_parser->blink_cursor ? CS_BLOCK|CS_BLINK : CS_BLOCK;
} else if (ps[0] == 2) {
vt_parser->cursor_style = CS_BLOCK;
} else if (ps[0] == 3) {
vt_parser->cursor_style = CS_UNDERLINE|CS_BLINK;
vt_parser->cursor_style = vt_parser->blink_cursor ? CS_UNDERLINE|CS_BLINK : CS_UNDERLINE;
} else if (ps[0] == 4) {
vt_parser->cursor_style = CS_UNDERLINE;
} else if (ps[0] == 5) {
vt_parser->cursor_style = CS_BAR|CS_BLINK;
vt_parser->cursor_style = vt_parser->blink_cursor ? CS_BAR|CS_BLINK : CS_BAR;
} else if (ps[0] == 6) {
vt_parser->cursor_style = CS_BAR;
}
Expand Down Expand Up @@ -7354,6 +7354,7 @@ vt_parser_t *vt_parser_new(vt_screen_t *screen, vt_termcap_ptr_t termcap, vt_cha
vt_parser->logging_vt_seq = logging_vt_seq;
vt_parser->unicode_policy = policy;
vt_parser->cursor_style = cursor_style;
vt_parser->blink_cursor = (cursor_style & CS_BLINK) ? 1 : 0;
vt_parser->is_visible_cursor = 1;
vt_parser->hide_pointer_mode = 1; /* Compatible with xterm 370 */

Expand Down Expand Up @@ -8442,8 +8443,10 @@ int vt_parser_set_config(vt_parser_t *vt_parser, const char *key, const char *va
} else if (strcmp(key, "blink_cursor") == 0) {
if (strcmp(value, "true") == 0) {
vt_parser->cursor_style |= CS_BLINK;
vt_parser->blink_cursor = 1;
} else {
vt_parser->cursor_style &= ~CS_BLINK;
vt_parser->blink_cursor = 0;
}
} else if (strcmp(key, "ignore_broadcasted_chars") == 0) {
int flag;
Expand Down
1 change: 1 addition & 0 deletions vtemu/vt_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ typedef struct vt_parser {
u_int use_local_echo : 1;
u_int use_locked_title : 1;
u_int invoke_macro : 1;
u_int blink_cursor : 1;

#ifdef USE_VT52
u_int is_vt52_mode : 1;
Expand Down