Tuesday 22 August 2006 21:44, Leo Savernik wrote:
Hello,
The second strike fixes improper indentation when closing doxygen
comments.
Consider this situation (| - caret, . - space):
/**
* bla
*/|
Now (using the cstyle-indenter) hit enter.
Without the patch, we receive:
/**
* bla
*/
|
whereas the patch leads to the expected result:
/**
* bla
*/
|
I. e. the caret is aligned with the indentation of the doxygen comment
*beginning*, not the *end* as it is currently handled by kate.
Please review. I'd like to commit the fix as soon as I've got green
light.
mfg
Leo
The bug does not exist (at least here) if you have C++ highlighting. For
C-highlighting it exists, indeed (didn't look why (*) ).
The proposed patch increases Kate's suck factor in the following example,
let's take some C-code:
void foo(); /** comment */
| <- this is where the cursor is then.
Fix would be to simply take the first char of Cursor returned by
Comment.
(*) More thoughts on that: The indenter sometimes uses highlighting
information to check for comments or other attributes. The CStyle indenter
reads the attributes only once in ::updateConfig(). If we change from C++
to C (or any other highlighting) the attributes change; a '{' can have
another 'int' then (cullmann: is that true?). If so, we need to call
m_indenter->updateConfig() in KateDocument::setHlMode(int mode);
Dominik
KWrite-Devel mailing list
KWrite-Devel (AT) kde (DOT) org