diff --git a/kallithea/front-end/kallithea-diff.less b/kallithea/front-end/kallithea-diff.less --- a/kallithea/front-end/kallithea-diff.less +++ b/kallithea/front-end/kallithea-diff.less @@ -168,10 +168,7 @@ BIN_FILENODE = 6 left: -8px; box-sizing: border-box; } -/* comment bubble, only visible when in a commentable diff */ -.commentable-diff tr.line.add:hover td .add-bubble, -.commentable-diff tr.line.del:hover td .add-bubble, -.commentable-diff tr.line.unmod:hover td .add-bubble { +.commentable-diff tr.line:hover td .add-bubble { display: block; z-index: 1; } diff --git a/kallithea/lib/diffs.py b/kallithea/lib/diffs.py --- a/kallithea/lib/diffs.py +++ b/kallithea/lib/diffs.py @@ -77,6 +77,7 @@ def as_html(table_class='code-difftable' }) for file_info in parsed_lines: + count_no_lineno = 0 # counter to allow comments on lines without new/old line numbers for chunk in file_info['chunks']: _html_empty = False for change in chunk: @@ -127,7 +128,13 @@ def as_html(table_class='code-difftable' ########################################################### # NO LINE NUMBER ########################################################### - _html.append('''\t''' % { + anchor = "%(filename)s_%(count_no_lineno)s" % { + 'filename': _safe_id(file_info['filename']), + 'count_no_lineno': count_no_lineno, + } + count_no_lineno += 1 + _html.append('''\t''' % { + 'anchor': anchor, 'olc': no_lineno_class, }) _html.append('''\n''')