Hi Me kate version are 4.14.2 When i use a switch inside a other switch the tool/Align make a bad indentation exemple switch(a) { case 'A': switch(b) { case 'A': break; } break; case 'B': switch(b) { case 'A': break; } break; } thanks you for your work Reproducible: Always Steps to Reproduce: 1. write switch(a) { case 'A': switch(b) { case 'A': break; } break; case 'B': switch(b) { case 'A': break; } break; } 2.presse on Tool/Align Actual Results: switch(a) { case 'A': switch(b) { case 'A': break; } break; case 'B': switch(b) { case 'A': break; } break; } Expected Results: switch(a) { case 'A': switch(b) { case 'A': break; } break; case 'B': switch(b) { case 'A': break; } break; }
Known issue, unfortunately not easy to fix, since finding the proper context in the cstyle indenter should be fast, and this would take quite some extra work. If you find a patch for cstyle.js, we'd happily accept it, though.
Still happens, but nothing will change if nobody provides at patch. See on https://kate-editor.org/join-us/ how to contribute.
*** Bug 505187 has been marked as a duplicate of this bug. ***