tweaks + docs

This commit is contained in:
Greg Shuflin committed 2025-02-10 20:00:34 -08:00
1 parent 85f1ce125b
commit 2579baaa48
2 files changed
+7 -4

No files matched your search

+3
View File
@@ -31,6 +31,9 @@ use self::{
pane_layout::PaneLayout,
};
/// An `Input` is any event that can effect the editor state. This will most often be things like
/// keystrokes and mouse clicks, but could in principle be something like a network packet
/// arriving.
#[derive(Clone, Debug)]
pub(crate) enum Input {
Character(char),
+4 -4
View File
@@ -129,20 +129,20 @@ impl TerminalUI {
async fn run(&mut self) -> Result<()> {
info!("Starting to run tui");
'outer: loop {
let evt = self.event_handler.next().await.unwrap();
match evt {
Event::Render => {
// Process any pending commands
self.editor_core.process_commands();
// Render the current state
self.terminal.draw(|mut frame| {
self.terminal_state
.render(&mut frame, &mut self.editor_core)
})?;
if self.editor_core.should_quit {
break 'outer;
}
@@ -160,7 +160,7 @@ impl TerminalUI {
}
}
}
Ok(())
}
}