1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-11-29 05:57:07 +02:00

Column numbers should start at 1.

ripgrep was documented to do 1-based indexing, so this is a bug and not
a breaking change.

Fixes #18
This commit is contained in:
Andrew Gallant
2016-09-23 17:11:09 -04:00
parent b33e9cba69
commit 6367dd61ba
2 changed files with 7 additions and 7 deletions

View File

@@ -213,7 +213,7 @@ impl<W: Terminal + Send> Printer<W> {
self.line_number(line_number, b':');
}
if let Some(c) = column {
self.write(c.to_string().as_bytes());
self.write((c + 1).to_string().as_bytes());
self.write(b":");
}
if self.replace.is_some() {