DiffTextView.st
changeset 17396 cdea4100c71b
parent 16744 072de442c2fa
child 17817 1b622818977b
--- a/DiffTextView.st	Sun Feb 12 12:59:35 2017 +0100
+++ b/DiffTextView.st	Sun Feb 12 13:04:02 2017 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1994 by Claus Gittinger
 	      All Rights Reserved
@@ -617,14 +615,16 @@
 documentation
 "
     I am a scroller background used by the diff-text-viewers.
-    I draws line-markers at positions where differences between two texts are.
+    I draw line-markers at positions where differences between two texts are.
 "
 ! !
 
 !DiffTextView::DiffTextScrollerBackground methodsFor:'accessing'!
 
-diffView:something
-    diffView := something.
+diffView:aDiffTextView
+    diffView := aDiffTextView.
+
+    "Modified (format): / 12-02-2017 / 12:53:09 / cg"
 ! !
 
 !DiffTextView::DiffTextScrollerBackground methodsFor:'drawing'!
@@ -637,10 +637,10 @@
 
     overAllHeight := leftTextView numberOfLines.
     1 to:overAllHeight do:[:lineNr |
-        |l1 l2 isDiff yThumb clr e|
+        |l1 l2 yThumb clr e|
 
         yThumb := (aScroller height * (lineNr / overAllHeight)) rounded.
-        (yThumb >= y and:[yThumb <= (y+h)]) ifTrue:[
+        (yThumb between:y and:(y + h)) ifTrue:[
             l1 := leftTextView listAt:lineNr.
             l2 := rightTextView listAt:lineNr.
             (l1 notNil and:[l1 isText]) ifTrue:[
@@ -650,7 +650,7 @@
                     e := l2 emphasis
                 ]
             ].
-            e size > 0 ifTrue:[
+            e notEmptyOrNil ifTrue:[
                 |el|
 
                 el := e detect:[:el | (Text extractEmphasis:#backgroundColor from:el) notNil] ifNone:nil.
@@ -663,6 +663,8 @@
             ].
         ].
     ]
+
+    "Modified: / 12-02-2017 / 12:54:36 / cg"
 ! !
 
 !DiffTextView::DiffTextScrollerBackground methodsFor:'ignored conversion'!