Author Topic: Smart Paste doesn't work with copied text in first column  (Read 3251 times)

davew

  • Senior Community Member
  • Posts: 224
  • Hero Points: 6
Smart Paste doesn't work with copied text in first column
« on: August 17, 2012, 07:13:09 pm »
17.0.2 Win7 64-bit (also verified it happens in 16.0.3).

If a copied line starts in column 1, Smart Paste leaves it in column 1 when pasting at an indented level. Is there some competing option that is overriding Smart Paste or is this a bug?

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: Smart Paste doesn't work with copied text in first column
« Reply #1 on: August 17, 2012, 08:48:30 pm »
In the beautifier settings there are some settings to allow certain things to not get indented further if they're at column 1.

davew

  • Senior Community Member
  • Posts: 224
  • Hero Points: 6
Re: Smart Paste doesn't work with copied text in first column
« Reply #2 on: August 20, 2012, 01:45:45 pm »
The only thing I could find in the beautifier settings that had anything to do with column 1 and indenting were for comments ("Indent column 1 comment" - which I set to ON), and under Preprocessing ("Keep # in column 1" - which I have set to OFF). So this is still a problem.

Unfortunately, our coding standard requires that first indent level statements within a C function start in column 1, so when I copy something to an indented level, it stays in column 1. We've got the most lame coding standard in (IMO  :(). However, SE should handle this.

davew

  • Senior Community Member
  • Posts: 224
  • Hero Points: 6
Re: Smart Paste doesn't work with copied text in first column
« Reply #3 on: August 20, 2012, 07:17:08 pm »
Additionally, I have syntax expansion on and I have the following format for my braces:

if ( test )
    {
    statement;
    }
else
    {
    statement;
    }

When I type the "if" keyword followed by a space, the parens and the braces are inserted in the correct position, even if I am in column 1. However, if I type "else" in column 1 and press enter, followed by the first brace, the braces are inserted in column 1 instead of being indented like this:

if ( test )
    {
    statement;
    }
else
{
}

If I don't get any further responses on this, I'll just submit a bug report.

« Last Edit: August 20, 2012, 07:19:01 pm by davew »

davew

  • Senior Community Member
  • Posts: 224
  • Hero Points: 6
Re: Smart Paste doesn't work with copied text in first column
« Reply #4 on: August 22, 2012, 12:32:33 am »
Opened support case CAS-59140-PY4C