@@ -7,7 +7,7 @@ use crate::{
7
7
} ,
8
8
keys:: { key_match, SharedKeyConfig } ,
9
9
popups:: { FileRevOpen , InspectCommitOpen } ,
10
- queue:: { Context , InternalEvent , Queue , StackablePopupOpen } ,
10
+ queue:: { InternalEvent , Queue , StackablePopupOpen } ,
11
11
string_utils:: tabs_to_spaces,
12
12
strings,
13
13
ui:: { self , style:: SharedTheme , AsyncSyntaxJob , SyntaxText } ,
@@ -96,7 +96,7 @@ pub struct BlameFilePopup {
96
96
table_state : std:: cell:: Cell < TableState > ,
97
97
key_config : SharedKeyConfig ,
98
98
current_height : std:: cell:: Cell < usize > ,
99
- blame : Option < BlameProcess > ,
99
+ pub blame : Option < BlameProcess > ,
100
100
app_sender : Sender < AsyncAppNotification > ,
101
101
git_sender : Sender < AsyncGitNotification > ,
102
102
repo : RepoPathRef ,
@@ -327,9 +327,7 @@ impl Component for BlameFilePopup {
327
327
self . hide_stacked ( true ) ;
328
328
self . visible = true ;
329
329
self . queue . push ( InternalEvent :: OpenPopup (
330
- StackablePopupOpen :: GotoLine ( Context :: Blame (
331
- self . blame . clone ( ) ,
332
- ) ) ,
330
+ StackablePopupOpen :: GotoLine ,
333
331
) ) ;
334
332
}
335
333
@@ -751,7 +749,8 @@ impl BlameFilePopup {
751
749
{
752
750
let mut table_state = self . table_state . take ( ) ;
753
751
let max_line_number = self . get_max_line_number ( ) ;
754
- table_state. select ( Some ( selection. min ( max_line_number) ) ) ;
752
+ table_state
753
+ . select ( Some ( selection. clamp ( 0 , max_line_number) ) ) ;
755
754
self . table_state . set ( table_state) ;
756
755
}
757
756
}
0 commit comments