File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,13 @@ By default the separator for the file header uses Unicode line drawing character
72
72
git config --bool --global diff-so-fancy.useUnicodeRuler false
73
73
```
74
74
75
+ ### rulerWidth
76
+
77
+ By default the separator for the file header spans the full width of the terminal. Use this setting to set the width of the file header manually.
78
+ ```
79
+ git config --global diff-so-fancy.rulerWidth 47 # git log's commit header width
80
+ ```
81
+
75
82
## Contributing
76
83
77
84
Pull requests are quite welcome, and should target the [ ` next ` branch] ( https://github.com/so-fancy/diff-so-fancy/tree/next ) . We are also looking for any feedback or ideas on how to make diff-so-fancy even * fancier* .
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ my $change_hunk_indicators = git_config_boolean("diff-so-fancy.changeHunkInd
22
22
my $strip_leading_indicators = git_config_boolean(" diff-so-fancy.stripLeadingSymbols" ," true" );
23
23
my $mark_empty_lines = git_config_boolean(" diff-so-fancy.markEmptyLines" ," true" );
24
24
my $use_unicode_dash_for_ruler = git_config_boolean(" diff-so-fancy.useUnicodeRuler" ," true" );
25
+ my $ruler_width = git_config(" diff-so-fancy.rulerWidth" , undef );
25
26
my $git_strip_prefix = git_config_boolean(" diff.noprefix" ," false" );
26
27
my $has_stdin = has_stdin();
27
28
@@ -557,7 +558,7 @@ sub trim {
557
558
# Print a line of em-dash or line-drawing chars the full width of the screen
558
559
sub horizontal_rule {
559
560
my $color = $_ [0] || " " ;
560
- my $width = ` tput cols` ;
561
+ my $width = $ruler_width || ` tput cols` ;
561
562
562
563
if (is_windows()) {
563
564
$width --;
You can’t perform that action at this time.
0 commit comments