Skip to content

Commit

Permalink
bail!() for error message
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
  • Loading branch information
wetheredge and the-mikedavis committed Feb 2, 2023
1 parent 9e697f0 commit c4ce96a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions helix-term/src/commands/typed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1140,9 +1140,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..] {
Expand Down

0 comments on commit c4ce96a

Please sign in to comment.