Author Topic: B2: C block paste indent issue  (Read 2070 times)

jc44

  • Senior Community Member
  • Posts: 307
  • Hero Points: 22
B2: C block paste indent issue
« 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

jc44

  • Senior Community Member
  • Posts: 307
  • Hero Points: 22
Re: B2: C block paste indent issue
« Reply #1 on: September 05, 2019, 11:43:34 am »
Still in B3

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6272
  • Hero Points: 484
Re: B2: C block paste indent issue
« Reply #2 on: September 05, 2019, 11:49:54 am »
Interesting. Doesn't happen if something that is unbraced is pasted. Looking into this.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6272
  • Hero Points: 484
Re: B2: C block paste indent issue
« Reply #3 on: September 05, 2019, 12:58:22 pm »
Fixed for beta 4

jc44

  • Senior Community Member
  • Posts: 307
  • Hero Points: 22
Re: B2: C block paste indent issue
« Reply #4 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.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6272
  • Hero Points: 484
Re: B2: C block paste indent issue
« Reply #5 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 

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6272
  • Hero Points: 484
Re: B2: C block paste indent issue
« Reply #6 on: September 24, 2019, 01:39:26 am »
Fixed for next build