fix: switch default profile to terminal and fixed some comments
This commit is contained in:
1 parent
971375bf1f
commit
52787b57c7
71 files changed
+671
-188
No files matched your search
@@ -1,3 +1,5 @@
|
||||
// tui entrypoint: sets up the terminal, runs the app, cleans up on exit.
|
||||
|
||||
pub mod app;
|
||||
pub mod error_buffer;
|
||||
mod event;
|
||||
@@ -12,6 +14,7 @@ pub type Tui = ratatui::DefaultTerminal;
|
||||
pub async fn show() -> color_eyre::Result<()> {
|
||||
let mut terminal = ratatui::init();
|
||||
|
||||
// opt into enhanced keyboard protocol to distinguish key press vs release
|
||||
let _ = crossterm::execute!(
|
||||
std::io::stdout(),
|
||||
crossterm::event::PushKeyboardEnhancementFlags(
|
||||
@@ -20,6 +23,8 @@ pub async fn show() -> color_eyre::Result<()> {
|
||||
)
|
||||
);
|
||||
|
||||
// figure out the terminal's font cell size for rendering images.
|
||||
// falls back to halfblock characters if the terminal doesn't respond
|
||||
let picker = ratatui_image::picker::Picker::from_query_stdio()
|
||||
.unwrap_or_else(|_| ratatui_image::picker::Picker::halfblocks());
|
||||
|
||||
|
||||
Reference in new issue
Block a user