SlickEdit Community

Archived Beta Discussions => SlickEdit 201x Beta Discussions => SlickEdit 2019 v24 Beta Discussion => Topic started by: jc44 on August 08, 2019, 03:33:47 pm

Title: B2: C block paste indent issue
Post by: jc44 on August 08, 2019, 03:33:47 pm
Win 10 x64, Brief emulation.  In this code snippet:

#include <stdio.h>

int main(int argc, char*argv[])
{
   if (argc == 1)
      printf("Argc == 1\n");

   printf("...\n");

   {
      printf("Braces\n");
   }
}

If I block copy the 3 lines of the "braces" block to the line below 'printf("Argc == 1\n");' then it ends up indented too far (in line with that printf).  If I just copy the 'printf("Braces\n")' line to the same place then the indent is correct.

Regards

JC
Title: Re: B2: C block paste indent issue
Post by: jc44 on September 05, 2019, 11:43:34 am
Still in B3
Title: Re: B2: C block paste indent issue
Post by: Clark on September 05, 2019, 11:49:54 am
Interesting. Doesn't happen if something that is unbraced is pasted. Looking into this.
Title: Re: B2: C block paste indent issue
Post by: Clark on September 05, 2019, 12:58:22 pm
Fixed for beta 4
Title: Re: B2: C block paste indent issue
Post by: jc44 on September 23, 2019, 04:48:50 pm
Yup - thanks - got another one though :-)
Code: [Select]
int main(int argc, char *argv[])
{
    if( 1 )
    {
        if( 1 )
            exit(0);
    } else
        printf("Oops\n");
}

Any paste after the final printf is indented too far.  If the "else" is on the next line rather than on the same line as the "}" then the issue goes away.
Title: Re: B2: C block paste indent issue
Post by: Clark on September 24, 2019, 12:21:04 am
I'll see if we can improve this. Smart indenting with Enter isn't handling this right so I'm not surprised smartpaste isn't working either 
Title: Re: B2: C block paste indent issue
Post by: Clark on September 24, 2019, 01:39:26 am
Fixed for next build