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;