From 071afd4cc5b307c3e00bca83fb40215a4a5560b6 Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Sat, 8 Jan 2022 14:11:00 +1100 Subject: [PATCH] Remove line numbers from selection --- gitweb.cgi | 6 +++--- static/gitweb.css | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/gitweb.cgi b/gitweb.cgi index 16e2e3c..b74ebd5 100755 --- a/gitweb.cgi +++ b/gitweb.cgi @@ -6444,8 +6444,8 @@ sub git_search_files { } print "
" . $cgi->a({-href => $file_href.'#l'.$lno, - -class => "linenr"}, sprintf('%4i', $lno)) . - ' ' . $ltext . "
\n"; + -class => "linenr"}, sprintf('%4i ', $lno)) . + $ltext . "\n"; } } if ($lastfile) { @@ -7198,7 +7198,7 @@ sub git_blob { chomp $line; $nr++; $line = untabify($line); - printf qq!
%4i %s
\n!, + printf qq!
%4i %s
\n!, $nr, esc_attr(href(-replay => 1)), $nr, $nr, $highlight ? sanitize($line) : esc_html($line, -nbsp=>1); } diff --git a/static/gitweb.css b/static/gitweb.css index 3212601..ba8e991 100644 --- a/static/gitweb.css +++ b/static/gitweb.css @@ -549,7 +549,8 @@ td.linenr { a.linenr { color: #999999; - text-decoration: none + text-decoration: none; + user-select: none; } a.rss_logo { -- 2.42.0