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

Checking terminal capabilities on each operation #45

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

Conversation

gridbugs
Copy link
Contributor

Hi again. This is a more controversial change than my previous one as it removes the capability check during initialization. When a terminal tries to perform some function, it only sends the relevant sequence if the terminal actually has that capability. The result is this library now works on more terminals (I specifically made this change because the library didn't work on urxvt due to a lack of "cnorm"). I tested it on urxvt/gnome-terminal and it appears to work fine, though I guess it's possible to run the library on an incompatible terminal and have it produce garbled output where previously it would have bailed out during init. Let me know what you think.

This removes the check performed during driver initialization that
ensures the terminal supports all the required capabilities. Driver::get
now returns an Option<_> which is Some("escape sequence") if the
terminal has the requested functionality, and None otherwise.

This removes the check performed during driver initialization that
ensures the terminal supports all the required capabilities. Driver::get
now returns an Option<_> which is Some("escape sequence") if the
terminal has the requested functionality, and None otherwise.
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.

1 participant