Author Topic: [B2] C block insert of function body gets wrong indent  (Read 245 times)

jc44

  • Senior Community Member
  • Posts: 286
  • Hero Points: 18
[B2] C block insert of function body gets wrong indent
« on: August 13, 2020, 12:44:23 pm »
[B2, Win 10 x64, Brief] Copying a C function body to after a C header indents the body to the level of the opening "(" in the function header.  Before and after examples attached.  To reproduce mark and copy the lines containing the body of vaapi_hevc_end_frame including the lines with the {}s and paste into the line following the definition of vaapi_hevc_decode_slice and you get:
Code: [Select]
static int vaapi_hevc_decode_slice(AVCodecContext *avctx,
                                   const uint8_t  *buffer,
                                   uint32_t        size)
                                   {
                                       av_log(avctx, AV_LOG_ERROR, "%s: Should never be called\n", __func__);
                                       return AVERROR_BUG;
                                   }
Interestingly if I hit Alt-U to undo then just the re-indent goes away and I have to hit Alt-U again to revert the paste.  Whilst this is convenient it isn't expected!

Thanks

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1480
  • Hero Points: 133
Re: [B2] C block insert of function body gets wrong indent
« Reply #1 on: August 13, 2020, 01:17:58 pm »
Interesting, I can reproduce it on one of my configurations, but not the others.  I'll take a look at it, thanks for the report.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1480
  • Hero Points: 133
Re: [B2] C block insert of function body gets wrong indent
« Reply #2 on: August 18, 2020, 02:20:35 pm »
Fixed for the next beta.