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.
Product Version = NetBeans IDE 7.0.1 (Build 201107282000) Operating System = Windows 7 version 6.1 running on x86 Java; VM; Vendor = 1.6.0_25 Runtime = Java HotSpot(TM) Client VM 20.0-b11 Steps to reproduce: 1. Pick the js file for editing, it must contain inline brackets, single-line if for instance, use autocomplete feature on any object or variable (Ctrl+Space in my case) 2. Select anything from the list, push Enter 3. Autocomplete comes with the side effect - some spaces in all file are removed, for example: "function() { $(this).dialog('close'); }" -> "function() {$(this).dialog('close');}" Additional screenshots cleary demonstrate the issue (there is only "Enter" push between these 2 screenshots): http://dl.dropbox.com/u/12874728/1.png http://dl.dropbox.com/u/12874728/2.png
I can confirm this behaviour with an additional more severe problem. I have noticed cases in which this deletes the first letter of the following statement. I have noticed the behaviour usually occurs when using autocomplete to get a function rather than a member from an object. Example: for (i = 0; i < n; i++){ } foobar = 1; obj = { f : function () {} }; foobar = 2; obj.//<-- do an autocomplete to fill in f here Result: for (i = 0; i < n; i++){ }foobar = 1; //space removed obj = { f : function () {} };oobar = 2; //first letter removed
Reproducible.
Fixed in web-main. http://hg.netbeans.org/web-main/rev/121bac047d54
Integrated into 'main-golden', will be available in build *201205100400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/121bac047d54 User: Petr Pisl <ppisl@netbeans.org> Log: #204304 - Strange behavior on autocomplete for JavaScript files