This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 235351

Summary: Sidebar and left margin: Allow line selection and cursor repositioning
Product: editor Reporter: janicki <janicki>
Component: Painting & PrintingAssignee: Miloslav Metelka <mmetelka>
Status: REOPENED ---    
Severity: normal    
Priority: P3    
Version: 7.3   
Hardware: PC   
OS: Mac OS X   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: Editor's Sidebar

Description janicki 2013-08-31 20:07:08 UTC
Created attachment 139531 [details]
Editor's Sidebar

In the attached screenshot, I set the block highlighting sidebar background color to light gray, to better see your layout.  From right to left, it seems there is a small (8 px?) margin to the left of text, then the block highlighting sidebar, then an unknown white area (some of other feature?), and finally the line number sidebar.

There are two main problems: 1) Normally (with a white block highlighting sidebar) it looks like my text is always indented two spaces.  This sometimes makes it difficult to judge how far code blocks are actually indented.  2) The white sidebar next to the white text area is a natural spot to place my mouse for selecting a range of lines... But this area is unselectable, and can't even open a context menu.  So, I'm forced to slowly creep the mouse closer to my text until the cursor changes from an arrow to an insertion (I-beam) icon.  It's just a pain.

So I have two suggestions: 

1) paint the whole sidebar the same color and the line number sidebar's background.  At least that will fix my expectations of selecting text there.  (I've tried to do this myself, but can't find the color setting, except for the block highlighter strip's background.

2) Allow the sidebar area to accept mouse click+drag for selecting lines.  (Except the hint icons I guess.)  Similarly, allow a single click to reposition the cursor to the beginning of the line.

I think if #2 were implemented, then it might eliminate the need for #1.

Comment 1 tomvdp 2013-11-22 14:07:35 UTC
Selecting whole lines in the editor is so difficult because of the white space between the sidebar and the text.  I struggle with this every time.
Comment 2 Martin Balin 2016-07-07 07:31:23 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 3 janicki 2016-07-07 11:01:32 UTC
Tested with NetBeans IDE Dev Build 201607070002.  Something was done to resolve this issue (Thanks!), but the result is a bit buggy.  

I can now click+drag in the numbered sidebar to select multiple lines.  However, it is difficult to select one line: I must first drag to select two, then drag backwards to select one.  (My suggestion would be to select one line if there is a click or double-click.  Currently, the IDE just rings the bell.)

Also, attempting to drag UPWARDS has odd results.  It seems to *merge* the existing selection (or cursor position if no existing selection) with the lines now selected while dragging, and everything in between.  FYI, dragging DOWNWARDS seems to work more as expected.