mirror of
https://github.com/extrawurst/gitui.git
synced 2024-11-29 14:45:34 +03:00
show cmds in new commit popup
This commit is contained in:
parent
702415c40d
commit
6a6fae9581
@ -201,10 +201,9 @@ impl App {
|
||||
self.revlog.update_git(ev)?;
|
||||
self.inspect_commit_popup.update_git(ev)?;
|
||||
|
||||
if let AsyncNotification::Status = ev {
|
||||
//TODO: is that needed?
|
||||
self.update_commands()
|
||||
}
|
||||
//TODO: better system for this
|
||||
// can we simply process the queue here and everyone just uses the queue to schedule a cmd update?
|
||||
self.update_commands();
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
@ -83,6 +83,18 @@ impl Component for InspectCommitComponent {
|
||||
.order(1),
|
||||
);
|
||||
|
||||
out.push(CommandInfo::new(
|
||||
commands::DIFF_FOCUS_RIGHT,
|
||||
self.can_focus_diff(),
|
||||
(self.is_visible() && !self.diff.focused()) || force_all,
|
||||
));
|
||||
|
||||
out.push(CommandInfo::new(
|
||||
commands::DIFF_FOCUS_LEFT,
|
||||
true,
|
||||
(self.is_visible() && self.diff.focused()) || force_all,
|
||||
));
|
||||
|
||||
visibility_blocking(self)
|
||||
}
|
||||
|
||||
|
@ -183,18 +183,17 @@ pub mod commands {
|
||||
"Add file or path to .gitignore",
|
||||
CMD_GROUP_CHANGES,
|
||||
);
|
||||
|
||||
///
|
||||
pub static STATUS_FOCUS_LEFT: CommandText = CommandText::new(
|
||||
pub static DIFF_FOCUS_LEFT: CommandText = CommandText::new(
|
||||
"Back [\u{2190}]", //←
|
||||
"view staged changes",
|
||||
"view and select changed files",
|
||||
CMD_GROUP_GENERAL,
|
||||
);
|
||||
///
|
||||
pub static STATUS_FOCUS_RIGHT: CommandText = CommandText::new(
|
||||
pub static DIFF_FOCUS_RIGHT: CommandText = CommandText::new(
|
||||
"Diff [\u{2192}]", //→
|
||||
"inspect file diff",
|
||||
CMD_GROUP_CHANGES,
|
||||
CMD_GROUP_GENERAL,
|
||||
);
|
||||
///
|
||||
pub static QUIT: CommandText = CommandText::new(
|
||||
|
@ -298,12 +298,12 @@ impl Component for Status {
|
||||
{
|
||||
let focus_on_diff = self.focus == Focus::Diff;
|
||||
out.push(CommandInfo::new(
|
||||
commands::STATUS_FOCUS_LEFT,
|
||||
commands::DIFF_FOCUS_LEFT,
|
||||
true,
|
||||
(self.visible && focus_on_diff) || force_all,
|
||||
));
|
||||
out.push(CommandInfo::new(
|
||||
commands::STATUS_FOCUS_RIGHT,
|
||||
commands::DIFF_FOCUS_RIGHT,
|
||||
self.can_focus_diff(),
|
||||
(self.visible && !focus_on_diff) || force_all,
|
||||
));
|
||||
|
Loading…
Reference in New Issue
Block a user