Comments distorts formatting

Bug Reports and Fixes

Comments distorts formatting

Postby sksoft » Thu Jan 24, 2008 1:05 pm

Code: Select all
Ext.extend(A, B, {
   f: function() {
      // comment
   var v1;
},

f2: function() {
   var v2;
}
});

If you delete comment or change it to /* */ everything will be fine after formatting.
Please, fix it ASAP, because it shifts all our formatting!
sksoft
 
Posts: 45
Joined: Fri Jan 04, 2008 1:36 pm

Postby eric_suen » Fri Jan 25, 2008 2:37 pm

The bug has be fixed, also a new feature called "align field literals on columns" for formatter be added, you can change the setting in "Indentation" page.
and the feature you request in thread viewtopic.php?t=381 also implemented, the hot fix can be download from:
http://www.spket.com/downloads/com.spket.js_1.6.6.jar
http://www.spket.com/downloads/com.spket.mime_1.6.6.jar
http://www.spket.com/downloads/com.spket.ui_1.6.6.jar

BTW, the hot key is Ctrl+] and Ctrl+Shift+]
eric_suen
Site Admin
 
Posts: 487
Joined: Wed Sep 28, 2005 7:00 am

Postby sksoft » Fri Jan 25, 2008 9:30 pm

Thanks for the superfast hotfix! It fixes most distortions, but... :wink: not everything.
Code: Select all
f1('v', function() {
   if (i) {
      // comment
   f2();
}
});

Also, if the first argument of f1 is string, the editor doesn't highlight first matching parenthesis (if the caret positioned after last ')' )
sksoft
 
Posts: 45
Joined: Fri Jan 04, 2008 1:36 pm

Postby eric_suen » Sat Jan 26, 2008 2:32 pm

eric_suen
Site Admin
 
Posts: 487
Joined: Wed Sep 28, 2005 7:00 am

Good work!

Postby sksoft » Sat Jan 26, 2008 3:43 pm

Thanks, you fixed it!
sksoft
 
Posts: 45
Joined: Fri Jan 04, 2008 1:36 pm

Comments in array of objects

Postby sksoft » Tue Aug 05, 2008 6:46 pm

Try to format this (2 times):
Code: Select all
{
   var v = f([{
      a: 1
   },
   /*{
      b: 2,
   },*/
   {
      c: 3
   }]);
}

Placing spaces & newlines around /* */ gives various (buggy) results. I can't find a good way to do this.
sksoft
 
Posts: 45
Joined: Fri Jan 04, 2008 1:36 pm


Return to Bugs

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron