SapphireSteel Forum
Welcome, Guest. Please login or register.
May 21, 2013, 09:46:20 AM

Login with username, password and session length
Search:     Advanced search
Welcome to the SapphireSteel forum - for discussion of the Ruby In Steel and Amethyst IDEs
3884 Posts in 800 Topics by 669 Members
Latest Member: m
* Home Help Search Login Register
+  SapphireSteel Forum
|-+  General
| |-+  Amethyst
| | |-+  Autoformatting bug...
« previous next »
Pages: [1] Print
Author Topic: Autoformatting bug...  (Read 1033 times)
Jason King
Full Member
***
Posts: 159


« on: September 22, 2010, 10:42:34 AM »

If you attempt to paste the following code snippet into some AS file, it will actually paste only part of the snippet...
Code:
Foo.Define("Foo", { bar:["foo", "bar"], params:{ foo:"Foo" } } );
will result in...
Code:
Foo.Define("Foo", {bar:["foo", "bar"],
Logged
Huw Collingbourne
Administrator
Hero Member
*****
Posts: 934



« Reply #1 on: September 23, 2010, 08:48:36 AM »

I can't duplicate this. I've tried in VS2008 and 2010 and I've experimented with a few formatting options to see if they have any effect but so far nothing. Can you give us more information?

Does this happen in all files or just (for example) MXML, or AS files?

Have you experimented with any of the formatting options to see if they have any effect?

Is there some common feature of pasted code that causes this problem? e.g. does it always fail after a comma or when it's pasted into a particular area of code (inside a method, inside a for loop or whatever)?

I'm really struggling to reproduce this one so if you have any hints, I'd be grateful.

best wishes

Huw
Logged
Jason King
Full Member
***
Posts: 159


« Reply #2 on: September 27, 2010, 11:08:51 AM »

Hi Huw,

I will try to track down the specific formatting option which would cause this.  In the meantime, it may be easier to reproduce if you make sure you copy the snippet along with an extra line following the snippet.

Cheers,
Jason
Logged
Jason King
Full Member
***
Posts: 159


« Reply #3 on: September 27, 2010, 11:19:42 AM »

Hi Huw,

The only formatting option that prevents this bug from occurring is the "Leave block on single line".  If that option is unchecked then it will expand out the pasted text, but reformat it.

Cheers,
Jason
Logged
Huw Collingbourne
Administrator
Hero Member
*****
Posts: 934



« Reply #4 on: September 27, 2010, 03:19:22 PM »

OK, I've managed to duplicate this.

For our reference, this is a step-by-step guide on how to reproduce this bug:

1) Tools/Options/Text Editor/ActionScript/Formatting Wrapping/Leave Block on single line must be checked.
2) A block similar to the following must be selected including a blank line beneath it.

Code:
Foo.Define("Foo", { bar:["foo", "bar"], params:{ foo:"Foo" } } );

3) When pasted, the line is truncate to this:

Code:
Foo.Define ("Foo",{bar : ["foo", "bar"],

4) Selecting Undo (e.g. Ctrl-Z) restores the complete pasted line.

I've entered this into our tracking system with a link to this thread.

Thanks

Huw
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!