Buggy code:
int startX ; int fillWidth ; if ( ( ( column == null ) || ( ( column . getOrderIndex ( ) ) == 0 ) ) || ( ( ( parent . style ) & ( SWT . FULL_SELECTION ) ) == 0 ) ) { startX = ( focusBounds . x ) + 1 ; } else { startX = column . getX ( ) ; } if ( column == null ) { fillWidth = ( focusBounds . width ) - 2 ; } else { fillWidth = ( ( column . getX ( ) ) + ( column . width ) ) - startX ; if ( ( ( column . getOrderIndex ( ) ) == ( ( parent . columns . length ) - 1 ) ) || ( ( ( parent . style ) & ( SWT . FULL_SELECTION ) ) == 0 ) ) { fillWidth -= 2 ; } } if ( fillWidth > 0 ) { gc . fillRectangle ( startX , ( ( focusBounds . y ) + 1 ) , fillWidth , ( ( focusBounds . height ) - 2 ) ) ; } } else { int startX = column . getX ( ) ; int fillWidth = column . width ; if ( ( column . getOrderIndex ( ) ) == 0 ) { startX += 1 ; fillWidth -= 1 ; } if ( ( column . getOrderIndex ( ) ) == ( ( parent . columns . length ) - 1 ) ) { fillWidth -= 2 ; } if ( fillWidth > 0 ) { gc . fillRectangle ( column . getX ( ) , ( ( cellBounds . y ) + 1 ) , fillWidth , ( ( cellBounds . height ) - 2 ) ) ; } } } } if ( backgroundOnly ) return false ; if ( ( columnIndex == 0 ) && ( ( ( parent . style ) & ( SWT . CHECK ) ) != 0 ) ) { Image baseImage = ( grayed ) ? parent . getGrayUncheckedImage ( ) : parent . getUncheckedImage ( ) ; Rectangle checkboxBounds = getCheckboxBounds ( ) ; gc . drawImage ( baseImage , checkboxBounds . x , checkboxBounds . y ) ; if ( checked ) { Image checkmarkImage = parent . getCheckmarkImage ( ) ; Rectangle checkmarkBounds = checkmarkImage . getBounds ( ) ; int xInset = ( ( checkboxBounds . width ) - ( checkmarkBounds . width ) ) // 2 ; int yInset = ( ( checkboxBounds . height ) - ( checkmarkBounds . height ) ) // 2 ; gc . drawImage ( checkmarkImage , ( ( checkboxBounds . x ) + xInset ) , ( ( checkboxBounds . y ) + yInset ) ) ; } } if ( drawContent ) { Image image = getImage ( columnIndex , false ) ; String text = getDisplayText ( columnIndex ) ; Rectangle imageArea = getImageBounds ( columnIndex ) ; int startX = imageArea . x ; int padding = parent . getCellPadding ( ) ; gc . setClipping ( startX , ( ( ( cellBounds . y ) + padding ) - ( parent . linesVisible ? 1 : 0 ) ) , ( ( cellRightX - startX ) - padding ) , ( ( cellBounds . height ) - ( 2 * ( padding - ( parent . linesVisible ? 1 : 0 ) ) ) ) ) ; if ( image != null ) { Rectangle imageBounds = image . getBounds ( ) ; gc . drawImage ( image , 0 , 0 , imageBounds . width , imageBounds . height , imageArea . x , imageArea . y , imageArea . width , imageArea . height ) ; } if ( ( text . length ( ) ) > 0 ) { gc . setFont ( getFont ( columnIndex , false ) ) ; int fontHeight = getFontHeight ( columnIndex ) ; if ( drawSelection && ( ( columnIndex == 0 ) || ( ( ( parent . style ) & ( SWT . FULL_SELECTION ) ) != 0 ) ) ) { if ( ( parent . hasFocus ( ) ) || ( ( ( parent . style ) & ( SWT . HIDE_SELECTION ) ) == 0 ) ) { gc . setForeground ( display . getSystemColor ( COLOR_LIST_SELECTION_TEXT ) ) ; } } else { <START_BUG> if ( ! isSelected ) { <END_BUG> gc . setForeground ( getForeground ( columnIndex ) ) ; } } x = ( getTextX ( columnIndex ) ) + ( TableItem . MARGIN_TEXT ) ; gc . drawString ( text , x , ( y + ( ( itemHeight - fontHeight ) // 2 ) ) , true ) ; } } if ( parent . hooks ( PaintItem ) ) { int contentWidth = getContentWidth ( columnIndex ) ; int contentX = getContentX ( columnIndex ) ; gc . setFont ( getFont ( ) ) ; if ( isSelected && ( ( columnIndex == 0 ) || ( ( ( parent . style ) & ( SWT . FULL_SELECTION ) ) != 0 ) ) ) { gc . setForeground ( display . getSystemColor ( COLOR_LIST_SELECTION_TEXT ) ) ; gc . setBackground ( display . getSystemColor ( COLOR_LIST_SELECTION ) ) ; } else { gc . setForeground ( getForeground ( columnIndex ) ) ; gc . setBackground ( getBackground ( columnIndex ) ) ; } Event event = new Event ( ) ; event . item = this ; event . gc = gc ; event . index = columnIndex ; if ( isSelected ) event . detail |= SWT . SELECTED ; if ( drawFocus ) event . detail |= SWT . FOCUSED ; event . x = contentX ; event . y = cellBounds . y ; event . width = contentWidth ; event . height = cellBounds . height ;

Fix:
if ( ( ! isSelected ) || drawSelection ) {