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.
...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.