-
Notifications
You must be signed in to change notification settings - Fork 8
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
rust-ui-template: use crossterm as the key / terminal backend #10
Conversation
this is to avoid confusion between `ratatui` and the `tui.rs` module of the library itself.
otherwise, the app starts in a invalid state and crashes when trying to navigate the data.
@fdncred |
also i'm concerned about the last caveat about peeking subdata 🤔 |
I don't have 0.84.0 installed anywhere. I try to stay on the latest main. I'd be excited to test it though if it were on 0.84.1. |
i wanted to know if using the could you just try the following? 😇
that'd be amazing 😊 |
we stop showing the error only when a key stroke is done by the user, otherwise, the error disappears as soon as there is a terminal tick.
this should bring the key handling match-based refactor from the main branch.
This works except for one thing. On Windows 1 keypress = 2 with crossterm because there is a press and release event. You have to do something like this Other than that, it works fine. |
ooh i'm happy this fixes the issue 😌
very good catch, let me fix that right now 😉 |
this should solve the merge conflicts in #10.
this commit tests if the key event is indeed only a press.
related to
📝 changelog
major
pub (super)
orpub (crate)
anymore, only nothing orpub
KeyCode
fromcrossterm
instead ofKey
fromconsole
(template requirement)foo<B: Backend>(frame: &mut Frame<'_, B>, ...)
instead offoo(frame: &mut Frame<CrosstermBackend<console::Term>>, ...)
for renderingsize
method toTui
to change the size of the editor dynamicallyminor / refactoring
tui.rs
toui.rs
(template file / only renaming)terminal.rs
withtui.rs
(template)event.rs
andtui.rs
as-is (template)tui
toratatui