forked from qt-creator/qt-creator
C++: Fix off-by-one in scopeAt.
The only Scope that set the end offset to *before* the last token was ObjCClassDeclaration. Change-Id: Icbdb5bcdd72d96087ac586ad51510fed74a633eb Reviewed-on: http://codereview.qt.nokia.com/2820 Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
This commit is contained in:
@@ -142,7 +142,7 @@ protected:
|
||||
unsigned endLine, endColumn;
|
||||
_unit->getPosition(scope->endOffset(), &endLine, &endColumn);
|
||||
|
||||
if (_line < endLine || (_line == endLine && _column <= endColumn))
|
||||
if (_line < endLine || (_line == endLine && _column < endColumn))
|
||||
_scope = scope;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user