mirror of
https://github.com/gitui-org/gitui
synced 2026-05-24 09:28:21 +00:00
fix help lacking
This commit is contained in:
parent
9e1db3d448
commit
2242ed34d2
1 changed files with 45 additions and 45 deletions
|
|
@ -262,58 +262,58 @@ impl Component for Status {
|
|||
out: &mut Vec<CommandInfo>,
|
||||
force_all: bool,
|
||||
) -> CommandBlocking {
|
||||
if self.visible {
|
||||
if self.visible || force_all {
|
||||
command_pump(
|
||||
out,
|
||||
force_all,
|
||||
self.components().as_slice(),
|
||||
);
|
||||
|
||||
{
|
||||
let focus_on_diff = self.focus == Focus::Diff;
|
||||
out.push(CommandInfo::new(
|
||||
commands::STATUS_FOCUS_LEFT,
|
||||
true,
|
||||
(self.visible && focus_on_diff) || force_all,
|
||||
));
|
||||
out.push(CommandInfo::new(
|
||||
commands::STATUS_FOCUS_RIGHT,
|
||||
self.can_focus_diff(),
|
||||
(self.visible && !focus_on_diff) || force_all,
|
||||
));
|
||||
}
|
||||
|
||||
out.push(
|
||||
CommandInfo::new(
|
||||
commands::SELECT_STATUS,
|
||||
true,
|
||||
(self.visible && self.focus == Focus::Diff)
|
||||
|| force_all,
|
||||
)
|
||||
.hidden(),
|
||||
);
|
||||
|
||||
out.push(
|
||||
CommandInfo::new(
|
||||
commands::SELECT_STAGING,
|
||||
true,
|
||||
(self.visible && self.focus == Focus::WorkDir)
|
||||
|| force_all,
|
||||
)
|
||||
.order(-2),
|
||||
);
|
||||
|
||||
out.push(
|
||||
CommandInfo::new(
|
||||
commands::SELECT_UNSTAGED,
|
||||
true,
|
||||
(self.visible && self.focus == Focus::Stage)
|
||||
|| force_all,
|
||||
)
|
||||
.order(-2),
|
||||
);
|
||||
}
|
||||
|
||||
{
|
||||
let focus_on_diff = self.focus == Focus::Diff;
|
||||
out.push(CommandInfo::new(
|
||||
commands::STATUS_FOCUS_LEFT,
|
||||
true,
|
||||
(self.visible && focus_on_diff) || force_all,
|
||||
));
|
||||
out.push(CommandInfo::new(
|
||||
commands::STATUS_FOCUS_RIGHT,
|
||||
self.can_focus_diff(),
|
||||
(self.visible && !focus_on_diff) || force_all,
|
||||
));
|
||||
}
|
||||
|
||||
out.push(
|
||||
CommandInfo::new(
|
||||
commands::SELECT_STATUS,
|
||||
true,
|
||||
(self.visible && self.focus == Focus::Diff)
|
||||
|| force_all,
|
||||
)
|
||||
.hidden(),
|
||||
);
|
||||
|
||||
out.push(
|
||||
CommandInfo::new(
|
||||
commands::SELECT_STAGING,
|
||||
true,
|
||||
(self.visible && self.focus == Focus::WorkDir)
|
||||
|| force_all,
|
||||
)
|
||||
.order(-2),
|
||||
);
|
||||
|
||||
out.push(
|
||||
CommandInfo::new(
|
||||
commands::SELECT_UNSTAGED,
|
||||
true,
|
||||
(self.visible && self.focus == Focus::Stage)
|
||||
|| force_all,
|
||||
)
|
||||
.order(-2),
|
||||
);
|
||||
|
||||
visibility_blocking(self)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue