Buggy code:
gc . fillRectangle ( itemX , itemY , itemWidth , itemHeight ) ; } else { Rectangle bounds = new Rectangle ( itemX , itemY , itemWidth , itemHeight ) ; fillBackground ( handle , gc . handle , bounds ) ; if ( ( ( columnCount ) == 0 ) || ( ( ( columnCount ) - 1 ) == columnIndex ) ) { bounds . x = ( itemX + itemWidth ) + gridWidth ; bounds . width = controlRight - itemX ; fillBackground ( handle , gc . handle , bounds ) ; } } } gc . setClipping ( region ) ; if ( selected ) { gc . setBackground ( display . getSystemColor ( COLOR_LIST_SELECTION ) ) ; gc . setForeground ( display . getSystemColor ( COLOR_LIST_SELECTION_TEXT ) ) ; } else { gc . setBackground ( item . getBackground ( columnIndex ) ) ; gc . setForeground ( item . getForeground ( columnIndex ) ) ; } gc . setFont ( item . getFont ( columnIndex ) ) ; Image image = item . getImage ( columnIndex ) ; String text = item . getText ( columnIndex ) ; Point extent = gc . stringExtent ( text ) ; int contentWidth = extent . x ; int paintWidth = contentWidth ; Rectangle imageBounds = null ; int gap = getGap ( ) ; if ( image != null ) { imageBounds = image . getBounds ( ) ; contentWidth += ( this . imageBounds . width ) + gap ; } draw = true ; if ( hooks ( MeasureItem ) ) { Event event = new Event ( ) ; event . item = item ; event . index = columnIndex ; event . gc = gc ; event . width = contentWidth ; event . height = itemHeight ; sendEvent ( MeasureItem , event ) ; if ( ( this . itemHeight ) == ( - 1 ) ) { this . itemHeight = event . height ; OS . SetDataBrowserTableViewRowHeight ( handle , ( ( short ) ( event . height ) ) ) ; } if ( setScrollWidth ( item ) ) { redrawWidget ( handle , false ) ; } contentWidth = event . width ; itemHeight = event . height ; gc . setClipping ( region ) ; } if ( hooks ( EraseItem ) ) { Event event = new Event ( ) ; event . item = item ; event . index = columnIndex ; event . gc = gc ; event . x = itemX ; event . y = itemY ; event . width = itemWidth ; event . height = itemHeight ; if ( selected ) event . detail |= SWT . SELECTED ; if ( focused ) event . detail |= SWT . FOCUSED ; sendEvent ( EraseItem , event ) ; draw = event . doit ; selected = ( ( event . detail ) & ( SWT . SELECTED ) ) != 0 ; focused = ( ( event . detail ) & ( SWT . FOCUSED ) ) != 0 ; gc . setClipping ( region ) ; } if ( draw ) { if ( selected && ( ( ( style ) & ( SWT . FULL_SELECTION ) ) != 0 ) ) { <START_BUG> if ( ( ( ( style ) & ( SWT . HIDE_SELECTION ) ) == 0 ) || focused ) { <END_BUG> gc . fillRectangle ( itemX , itemY , itemWidth , ( itemHeight - 1 ) ) ; } } if ( ( columnCount ) != 0 ) { TableColumn column = columns [ columnIndex ] ; if ( ( ( column . style ) & ( SWT . CENTER ) ) != 0 ) x += ( width - contentWidth ) // 2 ; if ( ( ( column . style ) & ( SWT . RIGHT ) ) != 0 ) x += width - contentWidth ; } if ( image != null ) { gc . drawImage ( image , 0 , 0 , imageBounds . width , imageBounds . height , x , ( y + ( ( height - ( this . imageBounds . height ) ) // 2 ) ) , this . imageBounds . width , this . imageBounds . height ) ; x += ( this . imageBounds . width ) + gap ; } if ( selected ) { if ( ( columnIndex == 0 ) && ( ( ( style ) & ( SWT . FULL_SELECTION ) ) == 0 ) ) { if ( ( ( ( style ) & ( SWT . HIDE_SELECTION ) ) == 0 ) || ( hasFocus ( ) ) ) { gc . fillRectangle ( ( x - 1 ) , y , ( ( extent . x ) + 2 ) , ( itemHeight - 1 ) ) ; } } } gc . drawString ( text , x , ( y + ( ( height - ( extent . y ) ) // 2 ) ) , true ) ; } if ( hooks ( PaintItem ) ) { Event event = new Event ( ) ; event . item = item ; event . index = columnIndex ; event . gc = gc ; event . x = x ; event . y = y ; event . width = paintWidth ; event . height = itemHeight ; if ( selected ) event . detail |= SWT . SELECTED ; if ( focused ) event . detail |= SWT . FOCUSED ; sendEvent ( PaintItem , event ) ; } OS . CGContextRestoreGState ( gc . handle ) ; OS . DisposeRgn ( itemRgn ) ; if ( gc != ( paintGC ) ) gc . dispose ( ) ;

Fix:
if ( ( ( ( style ) & ( SWT . HIDE_SELECTION ) ) == 0 ) || ( hasFocus ( ) ) ) {