fix: getting locked out when running script

This commit is contained in:
Jeevitha Kannan K S 2024-11-06 20:23:12 +05:30
parent 88d6fd12a2
commit 1ff69c7846
No known key found for this signature in database
GPG Key ID: 5904C34A2F7CE333

View File

@ -186,7 +186,9 @@ impl AppState {
pub fn draw(&mut self, frame: &mut Frame) {
let terminal_size = frame.area();
if terminal_size.width < MIN_WIDTH || terminal_size.height < MIN_HEIGHT {
if !matches!(self.focus, Focus::FloatingWindow(_)) && terminal_size.width < MIN_WIDTH
|| terminal_size.height < MIN_HEIGHT
{
let warning = Paragraph::new(format!(
"Terminal size too small:\nWidth = {} Height = {}\n\nMinimum size:\nWidth = {} Height = {}",
terminal_size.width,