A multibyte character in a line will shift the highlighting by of later e.g. variable names by one character. Reproducible: Always Steps to Reproduce: void test() { double celsius = -30.0; qDebug() << "it's freaking cold at" /* (in °C) */ << celsius; } Actual Results: The "c" of "celsius" is not colored as the rest of the word.
Confirmed and would be fixed by moving our code to QString instead of QByteArray, something which I already started investigating in the indexedstring-ng branch.
I tried to reproduce the bug in KDevelop 5 - colored word displayed normal. http://i.imgur.com/PiBoub6.png Probably it is necessary to close.
it's still valid in my testing.
void test() { char c = 0; /* ümlaut */ c++; } Highlighting and context browsing shows the first '+' as the use location of 'c', due to the 'ü' in the comment before.
We need to figure out how to efficiently translate the UTF-8 code points returned by the clang API to UTF-16 code points expected by KTextEditor::Cursor. I just sent a mail to the clang ML asking for input on how to handle this situation.
*** This bug has been marked as a duplicate of bug 274430 ***