Skip to content

Commit b70ea92

Browse files
author
Stephan Dilly
committed
show find command (closes #891)
1 parent 1e7258b commit b70ea92

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

src/app.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,15 @@ impl App {
832832
}
833833
}
834834

835+
res.push(CommandInfo::new(
836+
strings::commands::find_file(&self.key_config),
837+
!self.find_file_popup.is_visible(),
838+
(!self.any_popup_visible()
839+
&& self.files_tab.is_visible())
840+
|| self.revision_files_popup.is_visible()
841+
|| force_all,
842+
));
843+
835844
res.push(
836845
CommandInfo::new(
837846
strings::commands::toggle_tabs(&self.key_config),

src/strings.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,16 @@ pub mod commands {
367367
CMD_GROUP_GENERAL,
368368
)
369369
}
370+
pub fn find_file(key_config: &SharedKeyConfig) -> CommandText {
371+
CommandText::new(
372+
format!(
373+
"Find [{}]",
374+
key_config.get_hint(key_config.file_find)
375+
),
376+
"find file in tree",
377+
CMD_GROUP_GENERAL,
378+
)
379+
}
370380
pub fn toggle_tabs_direct(
371381
key_config: &SharedKeyConfig,
372382
) -> CommandText {

0 commit comments

Comments
 (0)