From: Manuel Nickschas Date: Tue, 15 Sep 2009 06:56:25 +0000 (+0200) Subject: Show one-letter words again X-Git-Tag: 0.5-rc2~39 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=cf0e5a5e8d6b27cd377b594a4342a7b493f815b0 Show one-letter words again Looks like QTextBoundaryFinder has a pathological issue with strings of length 1. --- 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;