| Summary: | Highlighting broken by previous multibyte characters | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | Rolf Eike Beer <kde> |
| Component: | Language Support: CPP (Clang-based) | Assignee: | kdevelop-bugs-null |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | normal | CC: | craftplace.ms, igorkuo, olaf.the.lost.viking |
| Priority: | NOR | ||
| Version First Reported In: | git master | ||
| Target Milestone: | --- | ||
| Platform: | openSUSE | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
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 *** |
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.