@@ -2,7 +2,7 @@ use crate::{
22 accessors,
33 cmdbar:: CommandBar ,
44 components:: {
5- event_pump, AppOption , BlameFileComponent ,
5+ event_pump, AppOption , BlameFileComponent , BranchFindPopup ,
66 BranchListComponent , CommandBlocking , CommandInfo ,
77 CommitComponent , CompareCommitsComponent , Component ,
88 ConfirmComponent , CreateBranchComponent , DrawableComponent ,
@@ -73,6 +73,7 @@ pub struct App {
7373 external_editor_popup : ExternalEditorComponent ,
7474 revision_files_popup : RevisionFilesPopup ,
7575 find_file_popup : FileFindPopup ,
76+ branch_find_popup : BranchFindPopup ,
7677 push_popup : PushComponent ,
7778 push_tags_popup : PushTagsComponent ,
7879 pull_popup : PullComponent ,
@@ -273,6 +274,11 @@ impl App {
273274 theme. clone ( ) ,
274275 key_config. clone ( ) ,
275276 ) ,
277+ branch_find_popup : BranchFindPopup :: new (
278+ & queue,
279+ theme. clone ( ) ,
280+ key_config. clone ( ) ,
281+ ) ,
276282 do_quit : QuitState :: None ,
277283 cmdbar : RefCell :: new ( CommandBar :: new (
278284 theme. clone ( ) ,
@@ -578,6 +584,7 @@ impl App {
578584 self ,
579585 [
580586 find_file_popup,
587+ branch_find_popup,
581588 msg,
582589 reset,
583590 commit,
@@ -629,6 +636,7 @@ impl App {
629636 rename_branch_popup,
630637 revision_files_popup,
631638 find_file_popup,
639+ branch_find_popup,
632640 push_popup,
633641 push_tags_popup,
634642 pull_popup,
@@ -892,6 +900,11 @@ impl App {
892900 flags
893901 . insert ( NeedsUpdate :: ALL | NeedsUpdate :: COMMANDS ) ;
894902 }
903+ InternalEvent :: OpenBranchFinder ( branches) => {
904+ self . branch_find_popup . open ( branches) ?;
905+ flags
906+ . insert ( NeedsUpdate :: ALL | NeedsUpdate :: COMMANDS ) ;
907+ }
895908 InternalEvent :: OptionSwitched ( o) => {
896909 match o {
897910 AppOption :: StatusShowUntracked => {
@@ -912,6 +925,11 @@ impl App {
912925 flags
913926 . insert ( NeedsUpdate :: ALL | NeedsUpdate :: COMMANDS ) ;
914927 }
928+ InternalEvent :: BranchFinderChanged ( idx) => {
929+ self . select_branch_popup . branch_finder_update ( idx) ?;
930+ flags
931+ . insert ( NeedsUpdate :: ALL | NeedsUpdate :: COMMANDS ) ;
932+ }
915933 InternalEvent :: OpenPopup ( popup) => {
916934 self . open_popup ( popup) ?;
917935 flags
0 commit comments