mirror of
https://github.com/crate-ci/typos.git
synced 2024-11-25 10:31:02 -05:00
fix(cli): Report correct column for brief output
This commit is contained in:
parent
2a6c8e9a3a
commit
9b2ca187db
1 changed files with 1 additions and 1 deletions
|
@ -134,7 +134,7 @@ impl Report for PrintLong {
|
||||||
fn print_brief_correction(msg: &Typo, palette: Palette) -> Result<(), std::io::Error> {
|
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 start = String::from_utf8_lossy(&msg.buffer[0..msg.byte_offset]);
|
||||||
let column_number =
|
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 {
|
match &msg.corrections {
|
||||||
typos::Status::Valid => {}
|
typos::Status::Valid => {}
|
||||||
typos::Status::Invalid => {
|
typos::Status::Invalid => {
|
||||||
|
|
Loading…
Reference in a new issue