Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 2d8053b

Browse files
dschokblees
authored andcommitted
Only switch on the line number toggle when highlighting is activated
Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 26109b2 commit 2d8053b

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
@@ -4543,7 +4543,8 @@ sub git_print_page_path {
45434543
print $cgi->a({-href => href(action=>"blob_plain", file_name=>$file_name,
45444544
hash_base=>$hb),
45454545
-title => $name}, esc_path($basename));
4546-
print '&nbsp;&nbsp;&nbsp;&nbsp;
4546+
if (gitweb_check_feature('highlight')) {
4547+
print '&nbsp;&nbsp;&nbsp;&nbsp;
45474548
<a id="lineNoToggle" href="#" onclick="toggleLineNumbers();"></a>
45484549
<script>
45494550
function toggleLineNumbers() {
@@ -4564,6 +4565,7 @@ sub git_print_page_path {
45644565
toggleLineNumbers();
45654566
</script>
45664567
';
4568+
}
45674569
} elsif (defined $type && $type eq 'tree') {
45684570
print $cgi->a({-href => href(action=>"tree", file_name=>$file_name,
45694571
hash_base=>$hb),

0 commit comments

Comments
 (0)