--- a/ListView.st Mon Jun 17 19:17:38 2019 +0200
+++ b/ListView.st Mon Jun 24 12:48:55 2019 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
@@ -1287,7 +1289,8 @@
!
removeIndex:lineNr
- "delete a line, redraw the view"
+ "delete a line, redraw the view.
+ Returns the receiver"
|visLine w h x
srcY "{ Class: SmallInteger }" |
@@ -1300,37 +1303,38 @@
shown ifFalse:[^ self].
visLine := self listLineToVisibleLine:lineNr.
visLine notNil ifTrue:[
- w := self widthForScrollBetween:lineNr and:(firstLineShown + nLinesShown).
+ w := self widthForScrollBetween:lineNr and:(firstLineShown + nLinesShown).
"/ x := textStartLeft.
"/ CLAUS fixes leftOver selection pixels
- w := w + leftMargin.
- x := margin.
-
- srcY := topMargin + (visLine * fontHeight).
+ w := w + leftMargin.
+ x := margin.
+
+ srcY := topMargin + (visLine * fontHeight).
"/ h := ((nLinesShown - visLine) * fontHeight).
- h := (height - margin - srcY).
- h > 0 ifTrue:[
- self catchExpose.
- self
- copyFrom:self
- x:x y:srcY
- toX:x y:(srcY - fontHeight)
- width:w height:h
- async:true.
- ].
- self redrawVisibleLine:nFullLinesShown.
- "
- redraw last partial line - if any
- "
- (nFullLinesShown ~~ nLinesShown) ifTrue:[
- self redrawVisibleLine:nLinesShown
- ].
- h > 0 ifTrue:[
- self waitForExpose
- ].
+ h := (height - margin - srcY).
+ h > 0 ifTrue:[
+ self catchExpose.
+ self
+ copyFrom:self
+ x:x y:srcY
+ toX:x y:(srcY - fontHeight)
+ width:w height:h
+ async:true.
+ ].
+ self redrawVisibleLine:nFullLinesShown.
+ "
+ redraw last partial line - if any
+ "
+ (nFullLinesShown ~~ nLinesShown) ifTrue:[
+ self redrawVisibleLine:nLinesShown
+ ].
+ h > 0 ifTrue:[
+ self waitForExpose
+ ].
]
- "Modified: / 27.2.1998 / 12:36:59 / cg"
+ "Modified: / 27-02-1998 / 12:36:59 / cg"
+ "Modified (comment): / 24-06-2019 / 12:47:22 / Claus Gittinger"
!
removeIndexWithoutRedraw:lineNr