diff --git a/src/kits/interface/BTextView/TextView.cpp b/src/kits/interface/BTextView/TextView.cpp index 057109c007..d003a36303 100644 --- a/src/kits/interface/BTextView/TextView.cpp +++ b/src/kits/interface/BTextView/TextView.cpp @@ -1523,6 +1523,13 @@ BTextView::SetFontAndColor(int32 startOffset, int32 endOffset, const BFont* font NormalizeFont(&newFont); } + if (!fStylable) { + // When the text view is not stylable, we always set the whole text's + // style and ignore the offsets + startOffset = 0; + endOffset = fText->Length(); + } + // add the style to the style buffer fStyles->SetStyleRange(startOffset, endOffset, fText->Length(), fontMode, &newFont, color);