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 151638

Summary: Quick fix surround with creates mismatched indent
Product: python Reporter: tonybeckham <tonybeckham>
Component: EditorAssignee: Torbjorn Norbye <tor>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: editor showing problem

Description tonybeckham 2008-10-28 18:38:02 UTC
Using code generation for a function immediately there is a quickfix/tooltip to surround with... If you select
Try/Except then format is broken.

System:
Product Version: NetBeans IDE 6.5 RC2 (Build 20081028113643)
Java: 1.5.0_16; Java HotSpot(TM) Client VM 1.5.0_16-133
System: Mac OS X version 10.5.5 running on i386; MacRoman; en_US (nb)

Steps:
1. invoke code generation in a py file of def + tab
2. Click lightbulb and select surround with Try/Except
3. Code is now broken
Comment 1 tonybeckham 2008-10-28 18:39:32 UTC
Created attachment 72794 [details]
editor showing problem
Comment 2 tonybeckham 2008-10-28 18:40:49 UTC
note: if you edit the name of the function then the light bulb goes away and the problem cannot be reproduced.
Comment 3 Torbjorn Norbye 2008-10-28 19:03:53 UTC
Fixed in changeset 539177a19556.  Surround with should not be enabled for line fragments like this, only for complete
lines. I fixed that, and also disabled selection hints during live code editing.
Comment 4 tonybeckham 2008-10-29 21:50:27 UTC
Fix Verified

Product Version: NetBeans IDE 6.5 RC2 (Build 20081029163756)
Java: 1.5.0_16; Java HotSpot(TM) Client VM 1.5.0_16-133
System: Mac OS X version 10.5.5 running on i386; MacRoman; en_US (nb)