Skip to content

Commit ad3ed29

Browse files
committed
Only switch on the line number toggle when highlighting is activated
Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 63d3fe9 commit ad3ed29

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gitweb/gitweb.perl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4547,7 +4547,8 @@ sub git_print_page_path {
45474547
print $cgi->a({-href => href(action=>"blob_plain", file_name=>$file_name,
45484548
hash_base=>$hb),
45494549
-title => $name}, esc_path($basename));
4550-
print '&nbsp;&nbsp;&nbsp;&nbsp;
4550+
if (gitweb_check_feature('highlight')) {
4551+
print '&nbsp;&nbsp;&nbsp;&nbsp;
45514552
<a id="lineNoToggle" href="#" onclick="toggleLineNumbers();"></a>
45524553
<script>
45534554
function toggleLineNumbers() {
@@ -4568,6 +4569,7 @@ sub git_print_page_path {
45684569
toggleLineNumbers();
45694570
</script>
45704571
';
4572+
}
45714573
} elsif (defined $type && $type eq 'tree') {
45724574
print $cgi->a({-href => href(action=>"tree", file_name=>$file_name,
45734575
hash_base=>$hb),

0 commit comments

Comments
 (0)