| Summary: | Kate improperly indents nested switch statements | ||
|---|---|---|---|
| Product: | [Applications] kate | Reporter: | Mark Rose <markrose> |
| Component: | indentation | Assignee: | KWrite Developers <kwrite-bugs-null> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | normal | CC: | christoph |
| Priority: | NOR | Keywords: | triaged |
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Ubuntu | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Mark Rose
2010-07-13 23:11:50 UTC
please add some test code that exhibits this behavior, instead of describing it by words. I need: - start code (e.g. the nested switches, however they look like) - what keys you press - what code (including indentation) you expect to get - what you actually get Open any file and save it as something.php. Then type in this simplified test input (\n for enter):
switch (foo)\n{\ncase 1:\nswitch (bar)\n{\ncase 1:\nbreak;\n}\nbreak;\ncase 2:\nbreak;\n}
What I get:
switch (foo)
{
case 1:
switch (bar)
{
case 1:
break;
}
break;
case 2:
break;
}
What I expected:
switch (foo)
{
case 1:
switch (bar)
{
case 1:
break;
}
break;
case 2:
break;
}
Notice the two extra tabulators before the 'case 2:' and the follow 'break;' lines.
I haven't confirmed it in every case, but it seems to be a bug in the 'C Style' indentation generally, not just in PHP.
Hi, the indenter is a javascript which you can fix and provide a patch. For docs see http://kate-editor.org/2009/10/29/extending-kate-with-scripts/ We have not the time nor expertise to maintain the indenters on our own. Please help out ;) Reopen if a patch is around. Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone! Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone! |