Hi folks... I'm new on the list, but I've been using nedit heavily since
2001.

The smart indent feature for 'C' (and probably other languages) is
broken in the so-called "5.6" release. It maintains the current level of
indentation, but doesn't automatically indent further after a
conditional or an opening brace. Until recently I've worked around this
by using the pre-compiled 5.5 releases on the website instead of the
vendor-supplied versions, but switching to 64-bit installations made
that a real pain. Today I decided to find and fix this problem.

It turns out that the changes made to address tracker #1560892 caused
the breakage. The broken commits are:

1.107  doc/help.etc
1.115  source/macro.c
1.141  source/menu.c

Removing these commits restores the previous functionality of the Smart
Indent feature.

To test:
1) Start nedit
2) Select Preferences -> Language Mode -> C
3) Verify Preferences -> Auto Indent -> Smart
4) Start entering (NOT cut-n-paste) a C program like this:

int f(int x)<ENTER>{<ENTER>

5) The broken version will leave the cursor at the left margin. The 5.5
version auto-indents one tab stop. Reverting the above commits restores
the 5.5 behavior. There are other ways to demonstrate this brokenness
and the correctness of this fix.

Changing this will also revert the behavior that the original
submitter/committer wanted to change, but I'll leave it to him to submit
a change that achieves his goals without breaking basic nedit functionality.

I've submitted tracker #3290514 for this.

-- 
NEdit Develop mailing list - [email protected]
http://www.nedit.org/mailman/listinfo/develop

Reply via email to