Two more columnNumber() calls that should be positionInBlock()

columnNumber() relies on text wrapping, and we're only interested in the
position of the cursor in the block.
This commit is contained in:
Thorbjørn Lindeijer
2010-06-16 17:30:20 +02:00
parent e1a0f5abef
commit a1a565b9c5
2 changed files with 2 additions and 2 deletions

View File

@@ -640,7 +640,7 @@ bool CppCodeCompletion::triggersCompletion(TextEditor::ITextEditable *editor)
if (TextEditor::BaseTextEditor *edit = qobject_cast<TextEditor::BaseTextEditor *>(editor->widget())) {
QTextCursor tc(edit->document());
tc.setPosition(pos);
return tc.columnNumber() == 1;
return tc.positionInBlock() == 1;
}
return false;