File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ pub struct FileDiff {
7171 /// list of hunks
7272 pub hunks : Vec < Hunk > ,
7373 /// lines total summed up over hunks
74- pub lines : u16 ,
74+ pub lines : usize ,
7575}
7676
7777pub ( crate ) fn get_diff_raw < ' a > (
@@ -144,7 +144,7 @@ pub fn get_diff(
144144 header_hash : hash ( header) ,
145145 lines : lines. clone ( ) ,
146146 } ) ;
147- res. lines += lines. len ( ) as u16 ;
147+ res. lines += lines. len ( ) ;
148148 } ;
149149
150150 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 {
172172
173173 if Self :: hunk_visible ( hunk_min, hunk_max, min, max) {
174174 for ( i, line) in hunk. lines . iter ( ) . enumerate ( ) {
175- if line_cursor >= min {
175+ if line_cursor >= min && line_cursor <= max {
176176 Self :: add_line (
177177 & mut res,
178178 width,
You can’t perform that action at this time.
0 commit comments