Skip to content

Commit

Permalink
🔨 fix: index outside of buffer (#107)
Browse files Browse the repository at this point in the history
* 🔨 fix: index outside of buffer
  • Loading branch information
ypszn authored Dec 19, 2024
1 parent 2436f18 commit aea46a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gui/src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ fn draw_popups(frame: &mut ratatui::Frame, app: &App) {
fn check_terminal_size(frame: &mut ratatui::Frame) -> bool {
let size = frame.size();
const MIN_WIDTH: u16 = 80;
const MIN_HEIGHT: u16 = 24;
const MIN_HEIGHT: u16 = 28;

if size.width < MIN_WIDTH || size.height < MIN_HEIGHT {
// Render a warning message if the terminal is too small
let warning = Paragraph::new("Terminal too small. Please resize to at least 80x24.")
let warning = Paragraph::new("Terminal too small. Please resize to at least 80x28.")
.alignment(Alignment::Center)
.style(Style::default().fg(Color::Red));
frame.render_widget(warning, size);
Expand Down Expand Up @@ -1228,4 +1228,4 @@ fn draw_warning_popup(frame: &mut ratatui::Frame) {
.style(Style::default().fg(Color::White));

frame.render_widget(warning_text, warning_area);
}
}

0 comments on commit aea46a8

Please sign in to comment.