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.revlog.update_git(ev)?;
|
||||||
self.inspect_commit_popup.update_git(ev)?;
|
self.inspect_commit_popup.update_git(ev)?;
|
||||||
|
|
||||||
if let AsyncNotification::Status = ev {
|
//TODO: better system for this
|
||||||
//TODO: is that needed?
|
// can we simply process the queue here and everyone just uses the queue to schedule a cmd update?
|
||||||
self.update_commands()
|
self.update_commands();
|
||||||
}
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
@ -83,6 +83,18 @@ impl Component for InspectCommitComponent {
|
|||||||
.order(1),
|
.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)
|
visibility_blocking(self)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -183,18 +183,17 @@ pub mod commands {
|
|||||||
"Add file or path to .gitignore",
|
"Add file or path to .gitignore",
|
||||||
CMD_GROUP_CHANGES,
|
CMD_GROUP_CHANGES,
|
||||||
);
|
);
|
||||||
|
|
||||||
///
|
///
|
||||||
pub static STATUS_FOCUS_LEFT: CommandText = CommandText::new(
|
pub static DIFF_FOCUS_LEFT: CommandText = CommandText::new(
|
||||||
"Back [\u{2190}]", //←
|
"Back [\u{2190}]", //←
|
||||||
"view staged changes",
|
"view and select changed files",
|
||||||
CMD_GROUP_GENERAL,
|
CMD_GROUP_GENERAL,
|
||||||
);
|
);
|
||||||
///
|
///
|
||||||
pub static STATUS_FOCUS_RIGHT: CommandText = CommandText::new(
|
pub static DIFF_FOCUS_RIGHT: CommandText = CommandText::new(
|
||||||
"Diff [\u{2192}]", //→
|
"Diff [\u{2192}]", //→
|
||||||
"inspect file diff",
|
"inspect file diff",
|
||||||
CMD_GROUP_CHANGES,
|
CMD_GROUP_GENERAL,
|
||||||
);
|
);
|
||||||
///
|
///
|
||||||
pub static QUIT: CommandText = CommandText::new(
|
pub static QUIT: CommandText = CommandText::new(
|
||||||
|
@ -298,12 +298,12 @@ impl Component for Status {
|
|||||||
{
|
{
|
||||||
let focus_on_diff = self.focus == Focus::Diff;
|
let focus_on_diff = self.focus == Focus::Diff;
|
||||||
out.push(CommandInfo::new(
|
out.push(CommandInfo::new(
|
||||||
commands::STATUS_FOCUS_LEFT,
|
commands::DIFF_FOCUS_LEFT,
|
||||||
true,
|
true,
|
||||||
(self.visible && focus_on_diff) || force_all,
|
(self.visible && focus_on_diff) || force_all,
|
||||||
));
|
));
|
||||||
out.push(CommandInfo::new(
|
out.push(CommandInfo::new(
|
||||||
commands::STATUS_FOCUS_RIGHT,
|
commands::DIFF_FOCUS_RIGHT,
|
||||||
self.can_focus_diff(),
|
self.can_focus_diff(),
|
||||||
(self.visible && !focus_on_diff) || force_all,
|
(self.visible && !focus_on_diff) || force_all,
|
||||||
));
|
));
|
||||||
|
Loading…
Reference in New Issue
Block a user