forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user