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 181326

Summary: Using "surround with" feature sometimes causes cursor/keyboard to become unresponsive
Product: editor Reporter: vbeffa <vbeffa>
Component: Hints & AnnotationsAssignee: Jan Lahoda <jlahoda>
Status: RESOLVED WORKSFORME    
Severity: normal Keywords: FOCUS, RANDOM
Priority: P3    
Version: 6.x   
Hardware: Macintosh   
OS: Mac OS X   
Issue Type: DEFECT Exception Reporter:

Description vbeffa 2010-02-28 07:52:01 UTC
If I select text and then right-click on the light bulb in the left-side gutter and choose "Surround with /*selection*/," this sometimes causes the cursor to disappear. I can then no longer type text into the file, nor position the mouse elsewhere and make the cursor reappear. Sometimes closing and reopening the file fixes it; sometimes I have to quit and restart the IDE.

Additionally, sometimes in addition to the selected text being surrounded with /* */, it is duplicated and left after the /* */ uncommented.

So if the original code was

if (A or B or C)

and I select

or B or C

and use the surround-with command, sometimes the result is

if (A /*or B or C*/ or B or C)
Comment 1 Marian Mirilovic 2012-10-19 11:15:36 UTC
Tested in NB 7.2.1 and works without any problems for a whole day. Reporter, if you are still able to reproduce it (even occasionally), please provide info about JDK version/build, NB version/build and OS/arch you are running the IDE on. Thanks in advance.