show find command (closes #891)

This commit is contained in:
Stephan Dilly 2021-09-06 14:33:08 +02:00
parent 1e7258b617
commit b70ea92608
2 changed files with 19 additions and 0 deletions

View file

@ -832,6 +832,15 @@ impl App {
}
}
res.push(CommandInfo::new(
strings::commands::find_file(&self.key_config),
!self.find_file_popup.is_visible(),
(!self.any_popup_visible()
&& self.files_tab.is_visible())
|| self.revision_files_popup.is_visible()
|| force_all,
));
res.push(
CommandInfo::new(
strings::commands::toggle_tabs(&self.key_config),

View file

@ -367,6 +367,16 @@ pub mod commands {
CMD_GROUP_GENERAL,
)
}
pub fn find_file(key_config: &SharedKeyConfig) -> CommandText {
CommandText::new(
format!(
"Find [{}]",
key_config.get_hint(key_config.file_find)
),
"find file in tree",
CMD_GROUP_GENERAL,
)
}
pub fn toggle_tabs_direct(
key_config: &SharedKeyConfig,
) -> CommandText {