Automatic indentation (2.4.0)

Jonathon
2010-07-07
2012-12-07
  • Jonathon

    Jonathon - 2010-07-07

    I just upgraded to 2.4.0 and I'm having problems with automatic indentation. A lot of the time it doesn't seem to be happening.

    Consider, for example, the following code block (indentation is tab-based):

    if (true) {
        foreach ($things AS $thing) {
            if ($thing == 1) {
                echo 'blah';
            }
        }
    }
    

    I'm finding, when typing this into a new, blank document, the cursor does not start the line following the foreach() statemement inline with the foreach as expected (ie. one tab space indented).  Instead it returns to the start of the line.  Similarly the line following the if() statement does not have the cursor placed inline with the start of the if() above (ie. two tab spaces indented).

    I think I have noticed the indentation working occationally, but I've been unable to reproduce the situations where it does work while testing.

    Have I missed a setting and / or are other people having a similar problem?

     
  • Pierre Fauconnier

    Hello,

    Actually this is a bug.
    > Have I missed a setting?
    Not at all: automatic indentation doesn't work yet. To be continued…

    Sorry for the late response. Regards,
    Pierre.

     
  • Jonathon

    Jonathon - 2010-07-21

    No problem at all, thanks for your reply.

    I suspected it was a bug, but didn't want to jump in and blame that without checking it wasn't my own fault!

     
  • Pierre Fauconnier

    I didn't check the column mode nor the line mode, but I think that Automatic indentation is back.
    Undo and redo seem ok.
    New version at http://devphp2.free.fr/files/devphp.exe

    In my humble opinion, there are some side effects with the option "trim trailing spaces"…
    So, to be continued, once again!

    Thanks for your courtesy,
    Pierre.

     

Log in to post a comment.