diff options
author | Christoph Rüßler <christoph.ruessler@mailbox.org> | 2021-04-24 09:08:25 +0200 |
---|---|---|
committer | Stephan Dilly <dilly.stephan@gmail.com> | 2021-04-24 14:02:51 +0200 |
commit | e7b703b9221e895f660953c34b30e929657368af (patch) | |
tree | 9395dba641b132e588946d6ae084a5fdf80b2832 /src/ui | |
parent | f081cbeb173509293dd8cced03651a6ce9707e20 (diff) |
Improve blame view
- Set default shortcut to `B` instead of `b` because the latter would
shadow `[b]ranches`.
- Add scrollbar.
- Show resolved commit id in title instead of `HEAD`.
- Make commit id bold if it is the commit id the file is blamed at.
- Don’t run blame on a binary file.
- Add shortcut for inspecting a commit in blame view.
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/style.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ui/style.rs b/src/ui/style.rs index b06d2750..2a19e1f2 100644 --- a/src/ui/style.rs +++ b/src/ui/style.rs @@ -229,6 +229,19 @@ impl Theme { ) } + pub fn commit_hash_in_blame( + &self, + is_blamed_commit: bool, + ) -> Style { + if is_blamed_commit { + Style::default() + .fg(self.commit_hash) + .add_modifier(Modifier::BOLD) + } else { + Style::default().fg(self.commit_hash) + } + } + pub fn push_gauge(&self) -> Style { Style::default() .fg(self.push_gauge_fg) |