File tree Expand file tree Collapse file tree 5 files changed +10
-9
lines changed Expand file tree Collapse file tree 5 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -402,7 +402,7 @@ impl BranchListComponent {
402
402
for ( i, displaybranch) in self
403
403
. branches
404
404
. iter ( )
405
- . skip ( self . scroll . get ( ) )
405
+ . skip ( self . scroll . get_top ( ) )
406
406
. take ( height)
407
407
. enumerate ( )
408
408
{
@@ -430,8 +430,9 @@ impl BranchListComponent {
430
430
branch_name += THREE_DOTS ;
431
431
}
432
432
433
- let selected =
434
- ( self . selection as usize - self . scroll . get ( ) ) == i;
433
+ let selected = ( self . selection as usize
434
+ - self . scroll . get_top ( ) )
435
+ == i;
435
436
436
437
let is_head = displaybranch
437
438
. local_details ( )
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ impl DetailsComponent {
140
140
. concat ( )
141
141
. iter ( )
142
142
. enumerate ( )
143
- . skip ( self . scroll . get ( ) )
143
+ . skip ( self . scroll . get_top ( ) )
144
144
. take ( height)
145
145
. map ( |( i, line) | {
146
146
Spans :: from ( vec ! [ Span :: styled(
Original file line number Diff line number Diff line change @@ -337,7 +337,7 @@ impl DiffComponent {
337
337
Span :: raw( Cow :: from( ")" ) ) ,
338
338
] ) ] ) ;
339
339
} else {
340
- let min = self . scroll . get ( ) ;
340
+ let min = self . scroll . get_top ( ) ;
341
341
let max = min + height as usize ;
342
342
343
343
let mut line_cursor = 0_usize ;
Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ impl RevisionFilesComponent {
182
182
183
183
let items = self
184
184
. tree
185
- . iterate ( self . scroll . get ( ) , tree_height)
185
+ . iterate ( self . scroll . get_top ( ) , tree_height)
186
186
. map ( |( item, selected) | {
187
187
Self :: tree_item_to_span ( item, & self . theme , selected)
188
188
} ) ;
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ impl VerticalScroll {
20
20
}
21
21
}
22
22
23
- pub fn get ( & self ) -> usize {
23
+ pub fn get_top ( & self ) -> usize {
24
24
self . top . get ( )
25
25
}
26
26
@@ -58,7 +58,7 @@ impl VerticalScroll {
58
58
visual_height : usize ,
59
59
) -> usize {
60
60
let new_top = calc_scroll_top (
61
- self . get ( ) ,
61
+ self . get_top ( ) ,
62
62
visual_height,
63
63
selection,
64
64
selection_max,
@@ -76,7 +76,7 @@ impl VerticalScroll {
76
76
line_count : usize ,
77
77
visual_height : usize ,
78
78
) -> usize {
79
- self . update ( self . get ( ) , line_count, visual_height)
79
+ self . update ( self . get_top ( ) , line_count, visual_height)
80
80
}
81
81
82
82
pub fn draw < B : Backend > (
You can’t perform that action at this time.
0 commit comments