Skip to content

Commit eb3d6c9

Browse files
yangantoStephan Dilly
authored andcommitted
update command list of revlog
1 parent 3101f7b commit eb3d6c9

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/strings.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,13 @@ pub mod commands {
286286
CMD_GROUP_DIFF,
287287
)
288288
}
289+
pub fn copy_hash(key_config: &SharedKeyConfig) -> CommandText {
290+
CommandText::new(
291+
format!("Copy Hash [{}]", get_hint(key_config.copy),),
292+
"copy selected commit hash to clipboard",
293+
CMD_GROUP_DIFF,
294+
)
295+
}
289296
pub fn diff_home_end(
290297
key_config: &SharedKeyConfig,
291298
) -> CommandText {

src/tabs/revlog.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,12 @@ impl Component for Revlog {
287287
self.visible || force_all,
288288
));
289289

290+
out.push(CommandInfo::new(
291+
strings::commands::copy_hash(&self.key_config),
292+
true,
293+
self.visible || force_all,
294+
));
295+
290296
visibility_blocking(self)
291297
}
292298

0 commit comments

Comments
 (0)