update command list of revlog

This commit is contained in:
Antonio Yang 2020-12-13 23:15:13 +08:00 committed by Stephan Dilly
parent 3101f7b104
commit eb3d6c9b0f
2 changed files with 13 additions and 0 deletions

View file

@ -286,6 +286,13 @@ pub mod commands {
CMD_GROUP_DIFF,
)
}
pub fn copy_hash(key_config: &SharedKeyConfig) -> CommandText {
CommandText::new(
format!("Copy Hash [{}]", get_hint(key_config.copy),),
"copy selected commit hash to clipboard",
CMD_GROUP_DIFF,
)
}
pub fn diff_home_end(
key_config: &SharedKeyConfig,
) -> CommandText {

View file

@ -287,6 +287,12 @@ impl Component for Revlog {
self.visible || force_all,
));
out.push(CommandInfo::new(
strings::commands::copy_hash(&self.key_config),
true,
self.visible || force_all,
));
visibility_blocking(self)
}