X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatitem.cpp;h=dfb069eafeb656a671b6de324cdfba2a931e16e2;hp=b5fb62ae204012bd93d0486543048799b3654290;hb=fbb96765b7039d74a2adaa0d17ed61ee64505786;hpb=6aaf227185e89aacd23ff25e3d5ff5030ace3093 diff --git a/src/qtui/chatitem.cpp b/src/qtui/chatitem.cpp index b5fb62ae..dfb069ea 100644 --- a/src/qtui/chatitem.cpp +++ b/src/qtui/chatitem.cpp @@ -91,8 +91,8 @@ int ChatItem::WrapColumnFinder::nextWrapColumn() { line.setLineWidth(item->width()); layout->endLayout(); } - int idx = line.xToCursor(lastwrappos + item->width()); - qreal x = line.cursorToX(idx); + int idx = line.xToCursor(lastwrappos + item->width(), QTextLine::CursorOnCharacter); + qreal x = line.cursorToX(idx, QTextLine::Trailing); w = w - wrapList.at(wordidx).width - (x - lastwrappos); lastwrappos = x; lastwrapcol = idx;