Respect blink_cursor config when escape sequences request cursor blink - #170
Respect blink_cursor config when escape sequences request cursor blink#170sporteka2 wants to merge 1 commit into
Conversation
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
|
Thanks. So, I’ve added --igncsi / ignored_csi_list to ignore specific CSI sequences. Could you please use it to ignore DECSCUSR, as shown below? (Add a following line to ~/.mlterm/main to ignore ^[[1 q, ^[[3 q and ^[[5 q.) ignored_csi_list = 1 q,3 q,5 q |
|
After exiting opencode/cline, the cursor starts blinking again, despite the |
|
In my environment, when I launched mlterm with 'ignored_csi_list=1 q,3 q,5 q' specified, the cursor did not start blinking after exiting opencode, To investigate and reproduce this issue, could you please provide ~/.mlterm/*.log generated when launching mlterm with --logseq option? |
|
I ran mlterm with Right before Proposed fix: treat
With this, |
When
blink_cursor=falseis 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_cursorflag tovt_parser_tthat 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 falseparse_vt100_escape_sequence()for DECSCUSR (CSI SP q) — don't add CS_BLINK to odd styles when blink_cursor is falseThe flag is preserved and updated when
blink_cursorconfig is changed at runtime.Fixes #169