Fix text selection at RichText.

This commit is contained in:
2025-11-28 02:03:18 +03:00
parent ed8209cc35
commit 32a8141504

View File

@@ -862,6 +862,12 @@ void RichText::Paint()
if ( m_LineBreaks.IsValidIndex( lineBreakIndexIndex ) && m_LineBreaks[lineBreakIndexIndex] < iLim )
iLim = m_LineBreaks[lineBreakIndexIndex];
// Stop when entering or exiting the selected range
if ( i < selection0 && iLim >= selection0 )
iLim = selection0;
if ( i >= selection0 && i < selection1 && iLim >= selection1 )
iLim = selection1;
// Handle non-drawing characters specially
for ( int iT = i; iT < iLim; iT++ )
{