Indentation engine removes indentation in #if blocks #383

Open
opened 2014-02-18 16:53:38 -06:00 by dgrunwald · 0 comments
dgrunwald commented 2014-02-18 16:53:38 -06:00 (Migrated from github.com)

The indentation engine seems to mistreat the bodies of inactive #if blocks.

    #if DEBUG
    void WpfWorkbench_PreviewGotKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)
    {
        FocusDebug("GotKeyboardFocus: oldFocus={0}, newFocus={1}", e.OldFocus, e.NewFocus);
    }
    #endif

When pressing Ctrl+I, one level of indentation is removed from the FocusDebug() call.
I would expect that inactive code blocks are completely ignored and not re-indented.

The indentation engine seems to mistreat the bodies of inactive #if blocks. ``` #if DEBUG void WpfWorkbench_PreviewGotKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e) { FocusDebug("GotKeyboardFocus: oldFocus={0}, newFocus={1}", e.OldFocus, e.NewFocus); } #endif ``` When pressing Ctrl+I, one level of indentation is removed from the FocusDebug() call. I would expect that inactive code blocks are completely ignored and not re-indented.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-icsharpcode/NRefactory#383
No description provided.