Fix off-by-one error in localization tests

BlameHunk lines start counting from 1, not 0. Comparing with `line + 1`
fix this.
This commit is contained in:
juliancoffee 2021-04-23 14:11:44 +03:00 committed by Avi Weinstock
parent daeea8f2c7
commit dbd044309f

View File

@ -421,8 +421,8 @@ mod tests {
},
};
if line >= e.final_start_line()
&& line < e.final_start_line() + e.lines_in_hunk()
if line + 1 >= e.final_start_line()
&& line + 1 < e.final_start_line() + e.lines_in_hunk()
{
state.chuck_line_range = Some((
e.final_start_line(),