Skip to content

Commit

Permalink
fix #87 after word double click
Browse files Browse the repository at this point in the history
  • Loading branch information
benibela committed Apr 28, 2018
1 parent eddac84 commit afd3df8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/qcodeedit/lib/qeditor.cpp
Expand Up @@ -3628,9 +3628,10 @@ void QEditor::mouseMoveEvent(QMouseEvent *e)
selectCursorMirrorBlock(newCursor, e->modifiers() & Qt::ShiftModifier);
} else {
if (m_multiClickCursor.isValid()) {
QDocumentCursor selection(m_multiClickCursor, newCursor);
selection.expandSelect(m_multiClickCursor.property("isTripleClick").toBool() ? QDocumentCursor::LineUnderCursor : m_doubleClickSelectionType);
m_cursor = selection;
m_cursor.select(m_multiClickCursor.lineNumber(), m_multiClickCursor.columnNumber(),
newCursor.lineNumber(), newCursor.columnNumber()
);
m_cursor.expandSelect(m_multiClickCursor.property("isTripleClick").toBool() ? QDocumentCursor::LineUnderCursor : m_doubleClickSelectionType);
} else {
m_cursor.setSelectionBoundary(newCursor);
}
Expand Down

0 comments on commit afd3df8

Please sign in to comment.