Respect blink_cursor config when escape sequences request cursor blink - #170
Open
sporteka2 wants to merge 1 commit into
Open
Respect blink_cursor config when escape sequences request cursor blink#170sporteka2 wants to merge 1 commit into
sporteka2 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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