Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9784
    supercoolm
    Participant

    with the following code


    uint32_t* init_temparray(){
    uint16_t tempArray[] = { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 };
    .
    .
    .
    return tempArray;
    }

    when I want to change value of the array, EmEditor automatically re-indent the line by removing all indentation of that line.

    when I move cursor to last 16-bit integer value and press 2, I expected this.


    uint32_t* init_temparray(){
    uint16_t tempArray[] = { 0x0000, 0x0000, 0x0000, 0x0000, 0x00002 };
    .
    .
    .
    return tempArray;
    }

    but EmEditor automatically modifies to code to


    uint32_t* init_temparray(){
    uint16_t tempArray[] = { 0x0000, 0x0000, 0x0000, 0x0000, 0x00002 };
    .
    .
    .
    return tempArray;
    }

    with some trial and error, it looks like this only happens when curly brackets is in the line (i.e. array definition)

    Is there a way to correct this behaviour without disabling other features?

    #9794
    Yutaka Emura
    Keymaster

    Hello supercoolm,

    You might want to modify the regular expressions specified in the Tab/Indent dialog box (configuration properties > General tab > Tab/Indent). I hope this helps.

    Thanks!

    #9795
    CrashNBurn
    Member

    I can’t reproduce this behaviour. I have [x] Auto Indent and [x] wrap indent enabled.

    #9828
    supercoolm
    Participant

    it’s reproducible on fresh install of latest EmEditor, so I think it’s a bug because default configuration comes with EmEditor does this.

    steps:

    1. fresh install latest EmEditor (64-bit edition)
    2. launch EmEditor
    3. select C++ configuration
    4. copy the first code snippet in my post and paste them into EmEditor
    5. enter number with keyboard to the array value between bracelet brackets

    example:
    change

    uint16_t tempArray[] = { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 };

    to

    uint16_t tempArray[] = { 0x0000, 0x0000, 0x0000, 0x00200, 0x0000 };

    6. observe indentation of the line immediately change to no indentation, which is wrong as described in the post

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.