File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -318,10 +318,10 @@ sub do_dsf_stuff {
318
318
}
319
319
320
320
my $next = shift (@$input );
321
- my ($file1 ) = $next =~ / rename from (.+)/ ;
321
+ my ($file1 ) = $next =~ / rename from (.+?)( \e | \t | $ )/ ;
322
322
323
323
$next = shift (@$input );
324
- my ($file2 ) = $next =~ / rename to (.+)/ ;
324
+ my ($file2 ) = $next =~ / rename to (.+?)( \e | \t | $ )/ ;
325
325
326
326
if ($file1 && $file2 ) {
327
327
# We may not have extracted this yet, so we pull from the config if not
@@ -625,14 +625,10 @@ sub file_change_string {
625
625
# If the files aren't the same it's a rename
626
626
} elsif ($file_1 ne $file_2 ) {
627
627
my ($old , $new ) = DiffHighlight::highlight_pair($file_1 ,$file_2 ,{only_diff => 1});
628
+ # highlight_pair already includes reset_color, but adds newline characters that need to be trimmed off
628
629
$old = trim($old );
629
630
$new = trim($new );
630
-
631
- # highlight_pair resets the colors, but we want it to be the meta color
632
- $old =~ s / (\e 0?\[ m)/ $1 $meta_color / g ;
633
- $new =~ s / (\e 0?\[ m)/ $1 $meta_color / g ;
634
-
635
- return " renamed: $old to $new " ;
631
+ return " renamed: $old$meta_color to $new "
636
632
# Something we haven't thought of yet
637
633
} else {
638
634
return " $file_1 -> $file_2 " ;
You can’t perform that action at this time.
0 commit comments