Commit 5b8cdde7 authored by con's avatar con
Browse files

Merge branch 'master' of

parents ede2a7c9 a86ea403
......@@ -926,7 +926,10 @@ int CppQuickFixOperation::match(TextEditor::QuickFixState *state)
Utils::ChangeSet::Range CppQuickFixOperation::range(unsigned tokenIndex) const
const CPlusPlus::Token &token = tokenAt(tokenIndex);
return Utils::ChangeSet::Range(token.begin(), token.end());
unsigned line, column;
_document->translationUnit()->getPosition(token.begin(), &line, &column);
const int start = editor()->document()->findBlockByNumber(line - 1).position() + column - 1;
return Utils::ChangeSet::Range(start, start + token.length());
Utils::ChangeSet::Range CppQuickFixOperation::range(CPlusPlus::AST *ast) const
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment