Version: KDE 3.96.2 (using KDE KDE 3.96.0) Installed from: Fedora RPMs While this is technically not a bug, the KatePart autoindenter has that annoying behavior of keeping only the indentation count and not the actual indentation characters from an original source file. This means that when working on sources with different conventions, the indentation settings have to be changed for every single source file to match its conventions or it will screw up the existing indentation as soon as a line is added. (Unfortunately, we can't really expect all source code in the world to have Kate modelines. ;-) ) The simple patch I'm about to attach (not tested yet though) changes the keepIndent function so it actually keeps the existing indentation of the preceding line verbatim. The intent here is that if the original was indented with 2 tabs and 3 spaces, it will always reproduce 2 tabs and 3 spaces, no matter what the indentation settings are. Even weird sequences like tab space space tab space should be reproduced as is. Comments welcome on: * whether this is a good idea or not, * whether the patch will actually work with all possible settings or some settings like "indent with spaces" will cause the tabs to get replaced anyway, * whether this can be included in 4.0. (Note that this is related to, but not the same as, bug 145664.)
Created attachment 22296 [details] Make keepIndent behave as advertised And here's the promised patch.
Any objections to me committing this patch?
Looks like this has finally been fixed now, with a new bug report and a different patch. No idea why my patch got ignored, but at least the issue is fixed now. *** This bug has been marked as a duplicate of bug 214147 ***
> No idea why my patch got ignored, but at least the issue is fixed now. ... because I wasn't aware of your bug report. Since you already prepared a patch, you should have bugged the Kate devs more back then ;-) They're usually very open for patches. Thank you anyway for this bug report and even providing a patch.
Btw., really thanks for using kate and even providing a patch :( I am sorry I never got time to really look at it nor apply it :(