SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: davew on August 17, 2012, 07:13:09 pm

Title: Smart Paste doesn't work with copied text in first column
Post by: davew 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?
Title: Re: Smart Paste doesn't work with copied text in first column
Post by: chrisant 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.
Title: Re: Smart Paste doesn't work with copied text in first column
Post by: davew 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.
Title: Re: Smart Paste doesn't work with copied text in first column
Post by: davew 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.

Title: Re: Smart Paste doesn't work with copied text in first column
Post by: davew on August 22, 2012, 12:32:33 am
Opened support case CAS-59140-PY4C