Skip to content

Commit 2ed1476

Browse files
committed
fix line number highlighting
1 parent 0136776 commit 2ed1476

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/webserver/database/error_highlighting.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ pub fn quote_source_with_highlight(source: &str, line_num: u64, col_num: u64) ->
4040
.unwrap_or_default()
4141
.saturating_sub(1);
4242
for line in source.lines() {
43-
current_line_num += 1;
4443
if current_line_num + 1 == line_num || current_line_num == line_num + 1 {
4544
writeln!(msg, "{line}").unwrap();
4645
} else if current_line_num == line_num {
4746
highlight_line_offset(&mut msg, line, col_num_usize);
4847
} else if current_line_num > line_num + 1 {
4948
break;
5049
}
50+
current_line_num += 1;
5151
}
5252
msg
5353
}

0 commit comments

Comments
 (0)