From 3d1acaa5d66409738654d9d08f24a1f81f078ba4 Mon Sep 17 00:00:00 2001 From: William Etheredge <33011447+wetheredge@users.noreply.github.com> Date: Mon, 31 Oct 2022 21:08:54 -0500 Subject: [PATCH] `bail!()` for error message Co-authored-by: Michael Davis --- helix-term/src/commands/typed.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs index 17974dd9ffbec..bd54fb19ae000 100644 --- a/helix-term/src/commands/typed.rs +++ b/helix-term/src/commands/typed.rs @@ -1124,9 +1124,7 @@ fn get_character_info( ); if let encoding::EncoderResult::Unmappable(char) = result { - cx.editor - .set_error(format!("{char:?} cannot be mapped to {}", encoding.name())); - return Ok(()); + bail!("{char:?} cannot be mapped to {}", encoding.name()); } for byte in &bytes[current_byte..] {