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

feat: Add a panic hook to reset terminal upon panic #141

Merged
merged 3 commits into from
Apr 3, 2024

Conversation

eld4niz
Copy link
Contributor

@eld4niz eld4niz commented Apr 2, 2024

Description

I implemented termion panic handler for the kmon. Mainly based on the script that's mentioned in the issue I linked below:

ratatui/ratatui#1005

Motivation and Context

#83

How Has This Been Tested?

I put panic!() to the lib.rs to generate panic and test if terminal will be messed up or not.

Screenshots / Output (if appropriate):

Screenshot from 2024-04-02 20-31-08

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (no code change)
  • Refactor (refactoring production code)
  • Other

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation and changelog accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • Rustfmt and Rust-clippy passed.

src/main.rs Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
@orhun orhun changed the title feature: add a panic hook to reset terminal upon panic feat: Add a panic hook to reset terminal upon panic Apr 3, 2024
Copy link
Owner

@orhun orhun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@orhun orhun merged commit 56a8ba7 into orhun:master Apr 3, 2024
2 of 5 checks passed
@eld4niz eld4niz deleted the panic_handler branch April 3, 2024 23:44
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