Author Topic: beta6: Auto complete and multiline C macros  (Read 1509 times)

os2bird

  • Community Member
  • Posts: 94
  • Hero Points: 11
beta6: Auto complete and multiline C macros
« on: October 25, 2014, 06:38:49 pm »
Just ran into some weird behavior here with beta 6 (64-bit windows) while editing a C macro. I've reduced it to the following example (whole C source file):
Code: [Select]
static int _abspath_component_length(const char *pszSrc)
{
    return 0;
}

#define _ABSPATH_SKIP_SLASHES(a_pszSrc) \
    do
Cursor is immediately following the 'do'.  When I then hit space to complete the do { ... } while (0) safety wrapper/scope I want around the macro code, the #define line gets doubled like this:
Code: [Select]
static int _abspath_component_length(const char *pszSrc)
{
    return 0;
}

#define _ABSPATH_SKIP_SLASHES(a_pszSrc) \
#define _ABSPATH_SKIP_SLASHES(a_pszSrc) \
    do
{
   
} while ();

Fortunately, this doesn't happen all the time, and sure, it's easy to work around, but it's annoying nonetheless.  Cannot say if this is a regression in SlickEdit v19.0.0.x or an old problem, though I'm pretty sure I've encountered it before a few times, a long time back.

-bird

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1310
  • Hero Points: 121
Re: beta6: Auto complete and multiline C macros
« Reply #1 on: October 27, 2014, 01:27:37 pm »
Reproduced it, taking a look at it.  Thanks for the report.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1310
  • Hero Points: 121
Re: beta6: Auto complete and multiline C macros
« Reply #2 on: October 27, 2014, 02:22:42 pm »
Fixed for the next drop.

os2bird

  • Community Member
  • Posts: 94
  • Hero Points: 11
Re: beta6: Auto complete and multiline C macros
« Reply #3 on: October 27, 2014, 02:42:15 pm »
Great. Thanks Patrick!