diff --git a/src/app.rs b/src/app.rs index 3d1eeb7d32..e8fb8f1398 100644 --- a/src/app.rs +++ b/src/app.rs @@ -4,9 +4,9 @@ use crate::{ cmdbar::CommandBar, components::{ command_pump, event_pump, AppOption, BlameFileComponent, - BranchListComponent, CommandInfo, CommitComponent, - CompareCommitsComponent, Component, ConfirmComponent, - CreateBranchComponent, DrawableComponent, + BlameFileOpen, BranchListComponent, CommandInfo, + CommitComponent, CompareCommitsComponent, Component, + ConfirmComponent, CreateBranchComponent, DrawableComponent, ExternalEditorComponent, FetchComponent, FileRevlogComponent, FuzzyFindPopup, FuzzyFinderTarget, HelpComponent, InspectCommitComponent, LogSearchPopupComponent, @@ -138,6 +138,18 @@ impl App { options.borrow().current_tab() }; + if let Some(StartMode::BlameFile { path_in_workdir }) = + start_mode + { + queue.push(InternalEvent::OpenPopup( + StackablePopupOpen::BlameFile(BlameFileOpen { + file_path: path_in_workdir.display().to_string(), + commit_id: None, + selection: None, + }), + )); + } + let mut app = Self { input, reset: ConfirmComponent::new( @@ -511,6 +523,7 @@ impl App { self.reset_popup.update()?; self.update_commands(); + self.process_internal_events()?; Ok(()) }