ui: Fixed error locations at line end span down to next line

This commit is contained in:
Eberhard Graether
2016-01-18 10:22:57 +01:00
parent 3884db21d7
commit 3852bb7e5c
+5 -1
View File
@@ -734,7 +734,11 @@ std::vector<QRect> QtCodeArea::getCursorRectsForAnnotation(const Annotation& ann
{
if (line == annotation.endLine)
{
cursor.setPosition(annotation.end);
// Avoid that annotations at line end span down to first column of the next line.
if (annotation.startLine != annotation.endLine || document()->findBlockByLineNumber(line - m_startLineNumber).length() != annotation.endCol)
{
cursor.setPosition(annotation.end);
}
}
else
{