EditTextView.st
branchjv
changeset 6085 4ecbe3a93aec
parent 6063 ef1842cb1d75
parent 6050 4fb30794fc81
child 6086 58d88b144b2b
--- a/EditTextView.st	Mon Jan 16 19:58:26 2017 +0000
+++ b/EditTextView.st	Wed Jan 25 17:40:20 2017 +0000
@@ -2640,8 +2640,8 @@
         x1 := x - w.
         x2 := x + w.
 
-        oldClip := self clippingRectangleOrNil.
-        self clippingRectangle:(margin@margin extent:(width-margin) @ (height-margin)).
+        oldClip := self clippingBoundsOrNil.
+        self clippingBounds:(margin@margin extent:(width-margin) @ (height-margin)).
 
         cursorType == #caret ifTrue:[
             self lineWidth:2.
@@ -2655,7 +2655,7 @@
                                     with:(x2 @ y2))
         ].
 
-        self clippingRectangle:oldClip
+        self clippingBounds:oldClip
     ].
     self paint:oldPaint.
 
@@ -2913,12 +2913,12 @@
         line := self visibleAt:cursorVisibleLine.
         (line notNil and:[line isText]) ifTrue:[
             cursorCol > 1 ifTrue:[
-                oldClip := self clippingRectangleOrNil.
+                oldClip := self clippingBoundsOrNil.
                 x := (self xOfCol:cursorCol inVisibleLine:cursorVisibleLine) - viewOrigin x.
                 y := self yOfVisibleLine:cursorVisibleLine.
-                self clippingRectangle:(x@y extent:((gc font width * 2) @ fontHeight)).
+                self clippingBounds:(x@y extent:((gc font width * 2) @ fontHeight)).
                 super redrawVisibleLine:cursorVisibleLine from:cursorCol-1 to:cursorCol.
-                self clippingRectangle:oldClip.
+                self clippingBounds:oldClip.
                 ^ self.
             ].
         ].
@@ -3365,6 +3365,8 @@
 
     |soCol wasOn lineNrAboveCursor ln originalLine prevTab|
 
+    list isEmptyOrNil ifTrue:[^ self]. "/ there is nothing to delete.
+    
     wasOn := self hideCursor.
 
     "JV@2012-01-06: Do not play with autoindent iff cursor is at the very beginning of the line"
@@ -3391,7 +3393,8 @@
                         "/ not allow a cursor position beyond the end of line,
                         "/ so avoid that cursorLine:col: will force us to the beginning of the line
                         originalLine size < prevTab ifTrue:[
-                            self at:cursorLine put:ln
+                            self checkForExistingLine:cursorLine.
+                            self basicListAt:cursorLine put:ln
                         ]
                     ].
                     self cursorLine:cursorLine col:prevTab.
@@ -4800,7 +4803,7 @@
         (newLine notNil and:[newLine isText]) ifTrue:[
             colNr > 1 ifTrue:[
                 cursorVisibleLine notNil ifTrue:[
-                    oldClip := self clippingRectangleOrNil.
+                    oldClip := self clippingBoundsOrNil.
                     x := (self xOfCol:colNr-1 inVisibleLine:cursorVisibleLine) - viewOrigin x.
                     y := self yOfVisibleLine:cursorVisibleLine.
 
@@ -4808,13 +4811,13 @@
                         self invalidateLine:lineNr.
                     ] ifFalse:[
                         drawCharacterOnly ifTrue:[
-                            self clippingRectangle:(x@y extent:((gc font width * 2) @ fontHeight)).
+                            self clippingBounds:(x@y extent:((gc font width * 2) @ fontHeight)).
                             self redrawLine:lineNr from:colNr-1 to:colNr
                         ] ifFalse:[
-                            self clippingRectangle:(x@y extent:((width - x) @ fontHeight)).
+                            self clippingBounds:(x@y extent:((width - x) @ fontHeight)).
                             self redrawLine:lineNr from:colNr-1
                         ].
-                        self clippingRectangle:oldClip.
+                        self clippingBounds:oldClip.
                     ].
                 ].
                 ^ self.