preeditPosition is relative to the block position
Done-with: Aaron Kennedy <aaron.kennedy@jollamobile.com>
Change-Id: If96a1d0939f84ab11f0642d5fe78d786c30f418a
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
int fragmentEnd = textPos + fragment.length();
#ifndef QT_NO_IM
if (preeditPosition >= 0
- && preeditPosition >= textPos
- && preeditPosition <= fragmentEnd) {
+ && (preeditPosition + block.position()) >= textPos
+ && (preeditPosition + block.position()) <= fragmentEnd) {
fragmentEnd += preeditLength;
}
#endif