--- a/DiffTextView.st Sun Jan 26 14:57:19 2014 +0100
+++ b/DiffTextView.st Sun Jan 26 15:10:11 2014 +0100
@@ -595,21 +595,28 @@
1 to:overAllHeight do:[:lineNr |
|l1 l2 isDiff yThumb clr e|
- l1 := textViews first listAt:lineNr.
- l2 := textViews second listAt:lineNr.
- (l1 notNil and:[l1 isText]) ifTrue:[
- e := l1 emphasis
- ] ifFalse:[
- (l2 notNil and:[l2 isText ]) ifTrue:[
- e := l2 emphasis
- ]
- ].
- e size > 0 ifTrue:[
- clr := Text extractEmphasis:#backgroundColor from:(e at:1).
- (clr brightness > 0.5) ifTrue:[ clr := clr darkened ].
- thumb paint:clr.
- yThumb := (thumb height * (lineNr / overAllHeight)) rounded.
- thumb displayLineFromX:1 y:yThumb toX:thumb width-2 y:yThumb.
+ yThumb := (thumb height * (lineNr / overAllHeight)) rounded.
+ (yThumb >= y and:[yThumb <= (y+h)]) ifTrue:[
+ l1 := textViews first listAt:lineNr.
+ l2 := textViews second listAt:lineNr.
+ (l1 notNil and:[l1 isText]) ifTrue:[
+ e := l1 emphasis
+ ] ifFalse:[
+ (l2 notNil and:[l2 isText ]) ifTrue:[
+ e := l2 emphasis
+ ]
+ ].
+ e size > 0 ifTrue:[
+ |el|
+
+ el := e detect:[:el | (Text extractEmphasis:#backgroundColor from:el) notNil] ifNone:nil.
+ el notNil ifTrue:[
+ clr := Text extractEmphasis:#backgroundColor from:el.
+ (clr brightness > 0.5) ifTrue:[ clr := clr darkened ].
+ thumb paint:clr.
+ thumb displayLineFromX:1 y:yThumb toX:thumb width-2 y:yThumb.
+ ].
+ ].
].
]
]
@@ -621,10 +628,10 @@
!DiffTextView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/DiffTextView.st,v 1.60 2014-01-26 13:57:19 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/DiffTextView.st,v 1.61 2014-01-26 14:10:11 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/DiffTextView.st,v 1.60 2014-01-26 13:57:19 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/DiffTextView.st,v 1.61 2014-01-26 14:10:11 cg Exp $'
! !