mirror of
https://github.com/git/git
synced 2024-08-27 03:29:21 +00:00
Only switch on the line number toggle when highlighting is activated
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
parent
458d6ffd0a
commit
610631e49c
|
@ -4267,7 +4267,8 @@ sub git_print_page_path {
|
|||
print $cgi->a({-href => href(action=>"blob_plain", file_name=>$file_name,
|
||||
hash_base=>$hb),
|
||||
-title => $name}, esc_path($basename));
|
||||
print '
|
||||
if (gitweb_check_feature('highlight')) {
|
||||
print '
|
||||
<a id="lineNoToggle" href="#" onclick="toggleLineNumbers();"></a>
|
||||
<script>
|
||||
function toggleLineNumbers() {
|
||||
|
@ -4288,6 +4289,7 @@ sub git_print_page_path {
|
|||
toggleLineNumbers();
|
||||
</script>
|
||||
';
|
||||
}
|
||||
} elsif (defined $type && $type eq 'tree') {
|
||||
print $cgi->a({-href => href(action=>"tree", file_name=>$file_name,
|
||||
hash_base=>$hb),
|
||||
|
|
Loading…
Reference in a new issue