Author Topic: Strange indent behavior when prior line ends in a \ ( backslash ) in a .c file  (Read 890 times)

LamaBrew

  • New Community Member
  • Posts: 1
  • Hero Points: 0
On advice of a coworker I'm trying out SE (v17.0.3.0 64-bit, latest hot fixes). I hit a strange problem and I would have said it was because I'm new to SE, except he could reproduce this too. So I figured I would ask here for advice.  In a .c file I have:

Code: [Select]
    #define CHECK_RVAL        if (rval != 0) TRACE_AVC(("%s.%d:  DAE command for channel %d failed with 0x%x.\n\r",  \
                                             __FUNCTION__, __LINE__, i, rval ));

    //
If I put the cursor in front of the comment // and hit enter I get this:
Code: [Select]
    #define CHECK_RVAL        if (rval != 0) TRACE_AVC(("%s.%d:  DAE command for channel %d failed with 0x%x.\n\r",  \
                                             __FUNCTION__, __LINE__, i, rval ));

                                                        //
but if the prior line doesn't have the \ it works as expected:
Code: [Select]
    #define CHECK_RVAL        if (rval != 0) TRACE_AVC(("%s.%d:  DAE command for channel %d failed with 0x%x.\n\r",   __FUNCTION__, __LINE__, i, rval ));


    //
It doesn't have to be a comment, I can just hit return on the blank line and the cursor will jump to col 57.
I have Document -> Adaptive off. Being new to SE I have not changed much for settings from the default, though I do have it in CodeWright emulation mode (yeah, finally moving on).

Anyone have any ideas what's going on?