diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs index ff4ca1fcc..57da74494 100644 --- a/helix-term/src/ui/prompt.rs +++ b/helix-term/src/ui/prompt.rs @@ -779,8 +779,8 @@ impl Component for Prompt { col += self.line[self.cursor..] .graphemes(true) .next() - .unwrap() - .width(); + .map(|g| g.width()) + .unwrap_or(0); } let line = area.height as usize - 1;