Edgewall Software
Modify

Opened 6 years ago

Last modified 3 years ago

#11445 new defect

Empty lines are invisible when hiding line column on browser view

Reported by: Jun Omae Owned by:
Priority: normal Milestone: next-stable-1.2.x
Component: version control/browser Version: 1.0-stable
Severity: normal Keywords:
Cc: Ryan J Ollos Branch:
Release Notes:
API Changes:

Description

When hiding line column on browser view, empty lines would be invisible. Also, empty lines cannot be copied to clipboard if line column is hide. The text without empty lines would be copied.

Attachments (2)

visible-line-column.png (10.2 KB ) - added by Jun Omae 6 years ago.
hidden-line-column.png (10.4 KB ) - added by Jun Omae 6 years ago.

Download all attachments as: .zip

Change History (6)

by Jun Omae, 6 years ago

Attachment: visible-line-column.png added

by Jun Omae, 6 years ago

Attachment: hidden-line-column.png added

comment:1 by Ryan J Ollos, 6 years ago

Cc: Ryan J Ollos added

Nice catch. I didn't even know the hide column of line numbers feature exists!

Last edited 6 years ago by Ryan J Ollos (previous) (diff)

comment:2 by Jun Omae, 6 years ago

I found workaround to show empty lines and copy to clipboard. It works well with Firefox 26 and Chrome 33 beta.

  • trac/mimeview/api.py

    diff --git a/trac/mimeview/api.py b/trac/mimeview/api.py
    index 47e1926..ae18947 100644
    a b class Mimeview(Component):  
    864864                        annotator.annotate_row(context, row, idx+1, line, data)
    865865                    else:
    866866                        row.append(tag.td())
    867                 row.append(tag.td(line))
     867                row.append(tag.td(line, tag.br))
    868868                yield row
    869869
    870870        return tag.table(class_='code')(

However, even with/without the workaround, the copied text to clipboard is broken with Internet Explorer.

IE 8 IE 11
[egg_info]
 
2 
tag_build = dev
 
3 
tag_svn_revision = true
 
4 
...
[egg_info] 


tag_build = dev 


tag_svn_revision = true 


 
... 

comment:3 by anonymous, 4 years ago

+1 for fixing this, even if IE remains broken.

comment:4 by Ryan J Ollos, 3 years ago

Milestone: next-stable-1.0.xnext-stable-1.2.x

Moved ticket assigned to next-stable-1.0.x since maintenance of 1.0.x is coming to a close. Please move the ticket back if it's critical to fix on 1.0.x.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned. Next status will be 'new'.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.