Unnamed repository; edit this file 'description' to name the repository.
| -rw-r--r-- | helix-term/src/ui/prompt.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs index ff4ca1fc..d2448335 100644 --- a/helix-term/src/ui/prompt.rs +++ b/helix-term/src/ui/prompt.rs @@ -779,8 +779,7 @@ impl Component for Prompt { col += self.line[self.cursor..] .graphemes(true) .next() - .unwrap() - .width(); + .map_or(0, |g| g.width()); } let line = area.height as usize - 1; |