File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ pub struct FileDiff {
71
71
/// list of hunks
72
72
pub hunks : Vec < Hunk > ,
73
73
/// lines total summed up over hunks
74
- pub lines : u16 ,
74
+ pub lines : usize ,
75
75
}
76
76
77
77
pub ( crate ) fn get_diff_raw < ' a > (
@@ -144,7 +144,7 @@ pub fn get_diff(
144
144
header_hash : hash ( header) ,
145
145
lines : lines. clone ( ) ,
146
146
} ) ;
147
- res. lines += lines. len ( ) as u16 ;
147
+ res. lines += lines. len ( ) ;
148
148
} ;
149
149
150
150
let mut put = |hunk : Option < DiffHunk > , line : git2:: DiffLine | {
Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ impl DiffComponent {
172
172
173
173
if Self :: hunk_visible ( hunk_min, hunk_max, min, max) {
174
174
for ( i, line) in hunk. lines . iter ( ) . enumerate ( ) {
175
- if line_cursor >= min {
175
+ if line_cursor >= min && line_cursor <= max {
176
176
Self :: add_line (
177
177
& mut res,
178
178
width,
You can’t perform that action at this time.
0 commit comments