diff --git a/src/editor/mod.rs b/src/editor/mod.rs index 558cb2b..46768d9 100644 --- a/src/editor/mod.rs +++ b/src/editor/mod.rs @@ -31,7 +31,7 @@ impl Editor { pub fn new(width: u64, height: u64) -> Editor { let mut editor = Editor { grid: Vec::new(), - title: "".to_string(), + title: "Neovide".to_string(), cursor: Cursor::new(), size: (width, height), default_colors: Colors::new(Some(colors::WHITE), Some(colors::BLACK), Some(colors::GREY)), diff --git a/src/window.rs b/src/window.rs index ae61c89..0c7900d 100644 --- a/src/window.rs +++ b/src/window.rs @@ -52,7 +52,7 @@ pub fn ui_loop(editor: Arc>, nvim: Neovim, initial_size: (u64, u64 let new_width = ((new_size.width + 1.0) as f32 / renderer.font_width) as u64; let new_height = ((new_size.height + 1.0) as f32 / renderer.font_height) as u64; // Add 1 here to make sure resizing doesn't change the grid size on startup - nvim.ui_try_resize(new_width as i64, new_height as i64).expect("Resize failed"); + nvim.ui_try_resize((new_width as i64).max(10), (new_height as i64).max(3)).expect("Resize failed"); } },