X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatlinemodelitem.cpp;h=824e9dabd4bf0bb2cf1e498229317b600453466d;hp=ea0b44a9677391fbbbae1ecd2551baa6431892dc;hb=79da84574c2e95ec37894b869668d6b6ffc71c59;hpb=b64a1e62e2168dc21e350fccc6c42b0d0d5e2a35 diff --git a/src/qtui/chatlinemodelitem.cpp b/src/qtui/chatlinemodelitem.cpp index ea0b44a9..824e9dab 100644 --- a/src/qtui/chatlinemodelitem.cpp +++ b/src/qtui/chatlinemodelitem.cpp @@ -182,8 +182,12 @@ void ChatLineModelItem::computeWrapList() const { line.setNumColumns(length); layout.endLayout(); - while((idx = finder.toNextBoundary()) >= 0 && idx < length) { - idx++; // the boundary is *before* the actual character + while((idx = finder.toNextBoundary()) >= 0 && idx <= length) { + if(idx < length) + idx++; // the boundary is *before* the actual character + + if(idx == oldidx) + continue; word.start = oldidx; int wordend = idx;