@@ -2,7 +2,7 @@ use crate::{
2
2
accessors,
3
3
cmdbar:: CommandBar ,
4
4
components:: {
5
- event_pump, AppOption , BlameFileComponent ,
5
+ event_pump, AppOption , BlameFileComponent , BranchFindPopup ,
6
6
BranchListComponent , CommandBlocking , CommandInfo ,
7
7
CommitComponent , CompareCommitsComponent , Component ,
8
8
ConfirmComponent , CreateBranchComponent , DrawableComponent ,
@@ -73,6 +73,7 @@ pub struct App {
73
73
external_editor_popup : ExternalEditorComponent ,
74
74
revision_files_popup : RevisionFilesPopup ,
75
75
find_file_popup : FileFindPopup ,
76
+ branch_find_popup : BranchFindPopup ,
76
77
push_popup : PushComponent ,
77
78
push_tags_popup : PushTagsComponent ,
78
79
pull_popup : PullComponent ,
@@ -273,6 +274,11 @@ impl App {
273
274
theme. clone ( ) ,
274
275
key_config. clone ( ) ,
275
276
) ,
277
+ branch_find_popup : BranchFindPopup :: new (
278
+ & queue,
279
+ theme. clone ( ) ,
280
+ key_config. clone ( ) ,
281
+ ) ,
276
282
do_quit : QuitState :: None ,
277
283
cmdbar : RefCell :: new ( CommandBar :: new (
278
284
theme. clone ( ) ,
@@ -578,6 +584,7 @@ impl App {
578
584
self ,
579
585
[
580
586
find_file_popup,
587
+ branch_find_popup,
581
588
msg,
582
589
reset,
583
590
commit,
@@ -629,6 +636,7 @@ impl App {
629
636
rename_branch_popup,
630
637
revision_files_popup,
631
638
find_file_popup,
639
+ branch_find_popup,
632
640
push_popup,
633
641
push_tags_popup,
634
642
pull_popup,
@@ -892,6 +900,11 @@ impl App {
892
900
flags
893
901
. insert ( NeedsUpdate :: ALL | NeedsUpdate :: COMMANDS ) ;
894
902
}
903
+ InternalEvent :: OpenBranchFinder ( branches) => {
904
+ self . branch_find_popup . open ( branches) ?;
905
+ flags
906
+ . insert ( NeedsUpdate :: ALL | NeedsUpdate :: COMMANDS ) ;
907
+ }
895
908
InternalEvent :: OptionSwitched ( o) => {
896
909
match o {
897
910
AppOption :: StatusShowUntracked => {
@@ -912,6 +925,11 @@ impl App {
912
925
flags
913
926
. insert ( NeedsUpdate :: ALL | NeedsUpdate :: COMMANDS ) ;
914
927
}
928
+ InternalEvent :: BranchFinderChanged ( idx) => {
929
+ self . select_branch_popup . branch_finder_update ( idx) ?;
930
+ flags
931
+ . insert ( NeedsUpdate :: ALL | NeedsUpdate :: COMMANDS ) ;
932
+ }
915
933
InternalEvent :: OpenPopup ( popup) => {
916
934
self . open_popup ( popup) ?;
917
935
flags
0 commit comments