Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for cursor style changing #129

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Ingvix
Copy link

@Ingvix Ingvix commented Aug 10, 2022

...using the widely supported XTerm CSI sequences and either using tmux established custom terminfo capabilities to translate them for the host terminal or falling back to just passing them on as is, if such capabilities are not set in the terminfo.

First I tried to implement this in a noninterfering manner but as there doesn't seem to be a widely supported way to query for the current cursor style from the terminal, it's better to set the default in the configuration. Were it not set and windows do not get their cursor style set on creation, cursor styles from windows that have set it on their own after creation would leak into windows not having their own cursor style set and that would be undesirable.

I felt that the configured default cursor could also be used as the default that's set if the parameter is missing from the escape sequence or if it's 1 which xterm documentation states as the default value, instead of just passing them as is, making the cursor a blinking block in most cases. If there are terminals that use a different default value along with possibly a different escape sequences, this also provides the flexibility to retain that default if desired.

Fixes #128

Any feedback is welcome.

...using the widely supported XTerm CSI sequences and either using tmux
established custom terminfo capabilities to translate them for the host
terminal or falling back to just passing them on as is if such
capabilities are not set in the terminfo.
@Ingvix
Copy link
Author

Ingvix commented Aug 13, 2022

Though I'm a bit unsure whether the default value should actually be 0 or 1. The docs shows (default) at the end of option 1, but could it be just showing that value 1 is the set default to which 0 would point to? My implemention assumes 1 always points to default cursor.

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.

Unable to change cursor type with escape sequences
1 participant