Skip to content

Fix dynamic terminfo when an alias is used #639

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

Merged
merged 3 commits into from
Dec 3, 2023
Merged

Conversation

rockorager
Copy link
Contributor

Currently, the dynamic terminfo loader will return an empty struct if it
encounters that an alias was used. An alias does not mean the output of
infocmp was incorrect. Set the name to the primary name from infocmp
and continue processing as necessary.

For users who have a terminal not in the internal terminfo database who
also may be using an alias TERM (for whatever reason...), the result is
that no error is given to the application, and the terminfo struct
returns empty strings at runtime...notably the application can't enter
the alternate screen and the app is immediately unusable.

Error was checked for nil twice. Only need to do so once
Currently, the dynamic terminfo loader will return an empty struct if it
encounters that an alias was used. An alias does not mean the output of
`infocmp` was incorrect. Set the name to the primary name from `infocmp`
and continue processing as necessary.

For users who have a terminal not in the internal terminfo database who
also may be using an alias TERM (for whatever reason...), the result is
that no error is given to the application, and the terminfo struct
returns empty strings at runtime...notably the application can't enter
the alternate screen and the app is immediately unusable.
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.

2 participants