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 - Quick fix surround with creates mismatched indent
Summary: Quick fix surround with creates mismatched indent
Status: VERIFIED FIXED
Alias: None
Product: python
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Torbjorn Norbye
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-28 18:38 UTC by tonybeckham
Modified: 2009-01-15 01:58 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
editor showing problem (150.77 KB, image/png)
2008-10-28 18:39 UTC, tonybeckham
Details

Note You need to log in before you can comment on or make changes to this bug.
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)