Ticket #2209: TextView-stippi.diff

File TextView-stippi.diff, 0.9 kB (added by stippi, 1 week ago)

Alternative fix

  • TextView.cpp

    old new  
    35763576                                } while ((tabChars + numTabs) < numBytes); 
    35773577                        } 
    35783578 
    3579                         if (inputRegion.CountRects() > 0) { 
     3579                        drawing_mode textRenderingMode = B_OP_COPY; 
     3580 
     3581                        if (inputRegion.CountRects() > 0 
     3582                                && ((offset <= fInline->Offset() 
     3583                                        && fInline->Offset() < offset + tabChars) 
     3584                                || (fInline->Offset() <= offset 
     3585                                        && offset < fInline->Offset() + fInline->Length()))) { 
     3586 
     3587                                textRenderingMode = B_OP_OVER; 
     3588 
    35803589                                BRegion textRegion; 
    35813590                                GetTextRegion(offset, offset + length, &textRegion); 
    35823591 
     
    36083617                        const char *stringToDraw = fText->GetString(offset, 
    36093618                                &returnedBytes); 
    36103619 
     3620                        view->SetDrawingMode(textRenderingMode); 
    36113621                        view->DrawString(stringToDraw, returnedBytes); 
    36123622                        if (foundTab) { 
    36133623                                float penPos = PenLocation().x - fTextRect.left;