regular refresh

This commit is contained in:
Jana Dönszelmann 2026-03-30 23:17:59 +02:00
parent 430c62c120
commit e490a2ce04
No known key found for this signature in database

View file

@ -13,6 +13,7 @@ use std::{
path::{Path, PathBuf},
process::exit,
sync::Arc,
time::Duration,
};
use tui_widget_list::{ListBuilder, ListView};
@ -408,6 +409,11 @@ impl App {
terminal.draw(|frame| frame.render_widget(&mut self, frame.area()))?;
// update every 250ms or more if there's an event
if !event::poll(Duration::from_millis(250))? {
continue;
}
match event::read()? {
Event::Key(key) => {
// to initialize, but we then do get manually for borrow reasons
@ -507,9 +513,9 @@ impl App {
let block = Block::bordered()
.style(styles.default)
.border_style(if selected {
styles.border
} else {
styles.border_highlighted
} else {
styles.border
});
let inner = block.inner(area);
block.render(area, buf);