EditTextView.st
changeset 666 9ac9adb80415
parent 662 4bcdf0cce3a7
child 671 f3fe0d8c604d
--- a/EditTextView.st	Wed May 22 13:25:23 1996 +0200
+++ b/EditTextView.st	Wed May 22 13:27:39 1996 +0200
@@ -922,7 +922,7 @@
      of cursor should be drawn.
      Currently, supported are: #block, #frame, #ibeam, #caret and #solidCaret"
 
-    |x y w char y2 x1 x2 oldPaint|
+    |x y w char y2 x1 x2 oldPaint oldClip|
 
     self hasSelection ifTrue:[
         "
@@ -963,6 +963,10 @@
             y2 := y + w.
             x1 := x - w.
             x2 := x + w.
+
+            oldClip := self clippingRectangleOrNil.
+            self clipRect:(margin@margin extent:(width-margin) @ (height-margin)).
+
             cursorType == #caret ifTrue:[
                 self lineWidth:2.
                 self displayLineFromX:x1 y:y2 toX:x y:y. 
@@ -973,12 +977,14 @@
                 self fillPolygon:(Array with:(x1 @ y2)
                                         with:(x @ y)
                                         with:(x2 @ y2))
-            ]
+            ].
+
+            self clipRect:oldClip
         ]
     ].
     self paint:oldPaint.
 
-    "Modified: 21.5.1996 / 23:48:56 / cg"
+    "Modified: 22.5.1996 / 13:14:14 / cg"
 !
 
 drawCursorCharacter
@@ -3076,8 +3082,8 @@
                     'font ...'
                     '-'
                     'indent'
-                    'autoIndent \c'
-                    'insertMode \c'
+                    '\c autoIndent'
+                    '\c insertMode'
                     '-'
                     'save as ...'
                     'print'
@@ -3132,7 +3138,7 @@
     ].
     ^ m.
 
-    "Modified: 7.3.1996 / 13:13:03 / cg"
+    "Modified: 22.5.1996 / 12:58:46 / cg"
 !
 
 paste
@@ -3780,5 +3786,5 @@
 !EditTextView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/EditTextView.st,v 1.75 1996-05-21 21:49:56 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/EditTextView.st,v 1.76 1996-05-22 11:27:39 cg Exp $'
 ! !