diff options
author | Kirawi | 2021-06-05 03:49:19 +0000 |
---|---|---|
committer | GitHub | 2021-06-05 03:49:19 +0000 |
commit | c17dcb8633550a4efde56ca5b4e2b00fbf9f45e1 (patch) | |
tree | 9ab71f76679c1735f275448768c091219e2d49c0 /helix-term/src/ui/prompt.rs | |
parent | 5a344a3ae508f571ad5427e14ffad683213bf142 (diff) |
Fixing Multiple Panics (#121)
* init
* wip
* wip
Diffstat (limited to 'helix-term/src/ui/prompt.rs')
-rw-r--r-- | helix-term/src/ui/prompt.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs index 1f424878..cdf303b8 100644 --- a/helix-term/src/ui/prompt.rs +++ b/helix-term/src/ui/prompt.rs @@ -114,7 +114,7 @@ impl Prompt { let selected_color = theme.get("ui.menu.selected"); // completion - let max_col = area.width / BASE_WIDTH; + let max_col = std::cmp::max(1, area.width / BASE_WIDTH); let height = ((self.completion.len() as u16 + max_col - 1) / max_col); let completion_area = Rect::new( area.x, |