Skip to content

Commit

Permalink
fix(cli): Report correct column for brief output
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Nov 30, 2022
1 parent 2a6c8e9 commit 9b2ca18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bin/typos-cli/report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ impl Report for PrintLong {
fn print_brief_correction(msg: &Typo, palette: Palette) -> Result<(), std::io::Error> {
let start = String::from_utf8_lossy(&msg.buffer[0..msg.byte_offset]);
let column_number =
unicode_segmentation::UnicodeSegmentation::graphemes(start.as_ref(), true).count();
unicode_segmentation::UnicodeSegmentation::graphemes(start.as_ref(), true).count() + 1;
match &msg.corrections {
typos::Status::Valid => {}
typos::Status::Invalid => {
Expand Down

0 comments on commit 9b2ca18

Please sign in to comment.