From a187d7a1341847a66e3b5139d359d5a5254e5438 Mon Sep 17 00:00:00 2001 From: Wilfred Hughes Date: Tue, 8 Aug 2023 08:53:33 -0700 Subject: [PATCH] Improve rename styling It should use the heading with colour, consistent with other modes, and the header should come before rename information. --- CHANGELOG.md | 2 ++ src/display/style.rs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f629549fca..56e85b9d6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ Tweaked the colours on the file header, to make metadata less prominent. +Improved styling of file rename information. + Improved syntax hightling for Java built-in types. ### Diffing diff --git a/src/display/style.rs b/src/display/style.rs index cf46aa2f67..bd4f58d7e4 100644 --- a/src/display/style.rs +++ b/src/display/style.rs @@ -477,8 +477,8 @@ pub fn header( match old_path { Some(old_path) => { - let renamed = format!("Renamed {} to {}", old_path, display_path); - format!("{}\n{}{}", renamed, display_path, trailer) + let renamed = format!("Renamed from {} to {}", old_path, display_path); + format!("{}{}\n{}", display_path_pretty, trailer, renamed) } None => { format!("{}{}", display_path_pretty, trailer)