Skip to content

Respect blink_cursor config when escape sequences request cursor blink - #170

Open
sporteka2 wants to merge 1 commit into
arakiken:masterfrom
sporteka2:master
Open

Respect blink_cursor config when escape sequences request cursor blink#170
sporteka2 wants to merge 1 commit into
arakiken:masterfrom
sporteka2:master

Conversation

@sporteka2

Copy link
Copy Markdown

When blink_cursor=false is set in ~/.mlterm/main, the cursor should never blink. However, escape sequences like DECSET 12 (\e[?12h) and DECSCUSR with odd styles (1, 3, 5) could override this setting and enable blinking.

This patch adds a blink_cursor flag to vt_parser_t that stores whether cursor blinking is allowed by config. The flag is checked in two places:

  • set_vtmode() for VTMODE_33 (DECSET/DECRST ?12) — skip setting CS_BLINK when blink_cursor is false
  • parse_vt100_escape_sequence() for DECSCUSR (CSI SP q) — don't add CS_BLINK to odd styles when blink_cursor is false

The flag is preserved and updated when blink_cursor config is changed at runtime.

Fixes #169

When blink_cursor=false in config, ignore DECSET 12 (\e[?12h) and
DECSCUSR odd styles (1, 3, 5) that try to enable cursor blinking.

Previously these escape sequences could override the user's config
setting, making blink_cursor=false ineffective.

Bug: arakiken#169
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

blink_cursor = false doesn't prevent blink from application escape codes

1 participant