diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-04-20 18:13:01 -0400 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-04-20 18:13:01 -0400 |
commit | 2f897531b41a21c5ed112d18f41f79078e6144b1 (patch) | |
tree | 2455612c50a6b03a6c405e86e912749ec693a1a9 /src/window | |
parent | d6dcbc78792396eafeb6ef8f3fb01b03e22ce550 (diff) |
use rustyline for textfield implementation
Diffstat (limited to 'src/window')
-rw-r--r-- | src/window/panel.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/window/panel.rs b/src/window/panel.rs index 64b3645..d1a7d5b 100644 --- a/src/window/panel.rs +++ b/src/window/panel.rs @@ -3,6 +3,8 @@ use ncurses; use crate::structs; use crate::ui; +const MIN_WIN_WIDTH: usize = 4; + #[derive(Debug, Clone)] pub struct JoshutoPanel { pub win: ncurses::WINDOW, @@ -95,7 +97,7 @@ impl JoshutoPanel { dirlist: &mut structs::JoshutoDirList, scroll_offset: usize, ) -> bool { - if self.cols < 8 { + if self.cols < MIN_WIN_WIDTH as i32 { return false; } let vec_len = dirlist.contents.len(); |