diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/text/qtextcursor.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp index e6af105..7dcb187 100644 --- a/src/gui/text/qtextcursor.cpp +++ b/src/gui/text/qtextcursor.cpp @@ -421,16 +421,20 @@ bool QTextCursorPrivate::movePosition(QTextCursor::MoveOperation op, QTextCursor break; } case QTextCursor::PreviousCharacter: +#ifdef Q_WS_MAC if (mode == QTextCursor::MoveAnchor && position != adjusted_anchor) newPosition = qMin(position, adjusted_anchor); else +#endif newPosition = priv->previousCursorPosition(position, QTextLayout::SkipCharacters); break; case QTextCursor::Left: +#ifdef Q_WS_MAC if (mode == QTextCursor::MoveAnchor && position != adjusted_anchor) newPosition = visualMovement ? qMax(position, adjusted_anchor) : qMin(position, adjusted_anchor); else +#endif newPosition = visualMovement ? priv->leftCursorPosition(position) : priv->previousCursorPosition(position, QTextLayout::SkipCharacters); break; @@ -542,16 +546,20 @@ bool QTextCursorPrivate::movePosition(QTextCursor::MoveOperation op, QTextCursor break; } case QTextCursor::NextCharacter: +#ifdef Q_WS_MAC if (mode == QTextCursor::MoveAnchor && position != adjusted_anchor) newPosition = qMax(position, adjusted_anchor); else +#endif newPosition = priv->nextCursorPosition(position, QTextLayout::SkipCharacters); break; case QTextCursor::Right: +#ifdef Q_WS_MAC if (mode == QTextCursor::MoveAnchor && position != adjusted_anchor) newPosition = visualMovement ? qMin(position, adjusted_anchor) : qMax(position, adjusted_anchor); else +#endif newPosition = visualMovement ? priv->rightCursorPosition(position) : priv->nextCursorPosition(position, QTextLayout::SkipCharacters); break; |