Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 113f257

Browse files
committed
Start column numbers from 1
This is a small change to start column numbers from 1 instead of 0. Issue: #17
1 parent 39df7c1 commit 113f257

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

‎src/display_list/from_snippet.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ fn format_header(
9292
} = item
9393
{
9494
if annotation.range.0 >= range.0 && annotation.range.0 <= range.1 {
95-
col = annotation.range.0 - range.0;
95+
col = annotation.range.0 - range.0 + 1;
9696
break;
9797
}
9898
row += 1;

‎tests/fixtures/no-color/multiline_annotation.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0308]: mismatched types
2-
--> src/format.rs:51:5
2+
--> src/format.rs:51:6
33
|
44
51 | ) -> Option<String> {
55
| -------------- expected `std::option::Option<std::string::String>` because of return type

‎tests/fixtures/no-color/multiline_annotation2.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0027]: pattern does not mention fields `lineno`, `content`
2-
--> src/display_list.rs:139:31
2+
--> src/display_list.rs:139:32
33
|
44
139 | if let DisplayLine::Source {
55
| ________________________________^

‎tests/fixtures/no-color/simple.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: expected one of `.`, `;`, `?`, or an operator, found `for`
2-
--> src/format_color.rs:171:8
2+
--> src/format_color.rs:171:9
33
|
44
169 | })
55
| - expected one of `.`, `;`, `?`, or an operator here

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /