@@ -6,7 +6,8 @@ use crate::{
6
6
Component , CreateBranchComponent , DrawableComponent ,
7
7
ExternalEditorComponent , HelpComponent ,
8
8
InspectCommitComponent , MsgComponent , PushComponent ,
9
- ResetComponent , StashMsgComponent , TagCommitComponent ,
9
+ ResetComponent , SelectBranchComponent , StashMsgComponent ,
10
+ TagCommitComponent ,
10
11
} ,
11
12
input:: { Input , InputEvent , InputState } ,
12
13
keys:: { KeyConfig , SharedKeyConfig } ,
@@ -45,6 +46,7 @@ pub struct App {
45
46
push_popup : PushComponent ,
46
47
tag_commit_popup : TagCommitComponent ,
47
48
create_branch_popup : CreateBranchComponent ,
49
+ select_branch_popup : SelectBranchComponent ,
48
50
cmdbar : RefCell < CommandBar > ,
49
51
tab : usize ,
50
52
revlog : Revlog ,
@@ -116,6 +118,11 @@ impl App {
116
118
theme. clone ( ) ,
117
119
key_config. clone ( ) ,
118
120
) ,
121
+ select_branch_popup : SelectBranchComponent :: new (
122
+ queue. clone ( ) ,
123
+ theme. clone ( ) ,
124
+ key_config. clone ( ) ,
125
+ ) ,
119
126
do_quit : false ,
120
127
cmdbar : RefCell :: new ( CommandBar :: new (
121
128
theme. clone ( ) ,
@@ -335,6 +342,7 @@ impl App {
335
342
push_popup,
336
343
tag_commit_popup,
337
344
create_branch_popup,
345
+ select_branch_popup,
338
346
help,
339
347
revlog,
340
348
status_tab,
@@ -487,6 +495,9 @@ impl App {
487
495
InternalEvent :: CreateBranch => {
488
496
self . create_branch_popup . open ( ) ?;
489
497
}
498
+ InternalEvent :: SelectBranch => {
499
+ self . select_branch_popup . open ( ) ?;
500
+ }
490
501
InternalEvent :: TabSwitch => self . set_tab ( 0 ) ?,
491
502
InternalEvent :: InspectCommit ( id, tags) => {
492
503
self . inspect_commit_popup . open ( id, tags) ?;
@@ -562,6 +573,7 @@ impl App {
562
573
|| self . tag_commit_popup . is_visible ( )
563
574
|| self . create_branch_popup . is_visible ( )
564
575
|| self . push_popup . is_visible ( )
576
+ || self . select_branch_popup . is_visible ( )
565
577
}
566
578
567
579
fn draw_popups < B : Backend > (
@@ -587,6 +599,7 @@ impl App {
587
599
self . msg . draw ( f, size) ?;
588
600
self . external_editor_popup . draw ( f, size) ?;
589
601
self . tag_commit_popup . draw ( f, size) ?;
602
+ self . select_branch_popup . draw ( f, size) ?;
590
603
self . create_branch_popup . draw ( f, size) ?;
591
604
self . push_popup . draw ( f, size) ?;
592
605
0 commit comments