mirror of
https://github.com/gitui-org/gitui
synced 2026-05-24 09:28:21 +00:00
show tab button in help and fix help for diff (fixes #48)
This commit is contained in:
parent
5f08bd61e6
commit
7e8e3a0bd5
3 changed files with 22 additions and 8 deletions
|
|
@ -415,6 +415,15 @@ impl App {
|
|||
);
|
||||
}
|
||||
|
||||
res.push(
|
||||
CommandInfo::new(
|
||||
commands::TOGGLE_TABS,
|
||||
true,
|
||||
!self.any_popup_visible(),
|
||||
)
|
||||
.hidden(),
|
||||
);
|
||||
|
||||
res.push(
|
||||
CommandInfo::new(
|
||||
commands::QUIT,
|
||||
|
|
|
|||
|
|
@ -350,16 +350,15 @@ impl Component for DiffComponent {
|
|||
.hidden(),
|
||||
);
|
||||
|
||||
let cmd_text = if self.current.is_stage {
|
||||
commands::DIFF_HUNK_REMOVE
|
||||
} else {
|
||||
commands::DIFF_HUNK_ADD
|
||||
};
|
||||
|
||||
out.push(CommandInfo::new(
|
||||
cmd_text,
|
||||
commands::DIFF_HUNK_REMOVE,
|
||||
self.selected_hunk.is_some(),
|
||||
self.focused,
|
||||
self.focused && self.current.is_stage,
|
||||
));
|
||||
out.push(CommandInfo::new(
|
||||
commands::DIFF_HUNK_ADD,
|
||||
self.selected_hunk.is_some(),
|
||||
self.focused && !self.current.is_stage,
|
||||
));
|
||||
|
||||
CommandBlocking::PassingOn
|
||||
|
|
|
|||
|
|
@ -24,6 +24,12 @@ pub mod commands {
|
|||
static CMD_GROUP_CHANGES: &str = "Changes";
|
||||
static CMD_GROUP_COMMIT: &str = "Commit";
|
||||
|
||||
///
|
||||
pub static TOGGLE_TABS: CommandText = CommandText::new(
|
||||
"Tabs [tabs]",
|
||||
"switch top level tabs",
|
||||
CMD_GROUP_GENERAL,
|
||||
);
|
||||
///
|
||||
pub static HELP_OPEN: CommandText = CommandText::new(
|
||||
"Help [h]",
|
||||
|
|
|
|||
Loading…
Reference in a new issue