class: CodeView
authorClaus Gittinger <cg@exept.de>
Fri, 18 Oct 2013 23:12:49 +0200
changeset 4813 938c3cbafe4c
parent 4812 ca6d48bf0053
child 4814 6f9c85f3fbfb
class: CodeView changed: #cursorReturn autoIndent
CodeView.st
--- a/CodeView.st	Fri Oct 18 17:01:49 2013 +0200
+++ b/CodeView.st	Fri Oct 18 23:12:49 2013 +0200
@@ -78,7 +78,7 @@
 !CodeView class methodsFor:'others'!
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libwidg/CodeView.st,v 1.64 2013-05-29 17:15:20 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/CodeView.st,v 1.65 2013-10-18 21:12:49 cg Exp $'
 ! !
 
 !CodeView methodsFor:'accessing'!
@@ -128,18 +128,23 @@
         super cursorReturn.
         ^ self.
     ].
+    "/ autoIndent
 
-    wasOn := self hideCursor .
-    line := self listAt:cursorLine.
-    newCol := line size == 0
-                    ifTrue:[1]
-                    ifFalse:[line indexOfNonSeparator].
+    wasOn := self hideCursor.
+"/
+"/    line := self listAt:cursorLine.
+"/    newCol := line size == 0
+"/                    ifTrue:[1]
+"/                    ifFalse:[line indexOfNonSeparator].
+"/    super cursorReturn.
+"/    line := self listAt:cursorLine.
+"/
+"/    newCol := line size == 0
+"/                    ifTrue:[newCol]
+"/                    ifFalse:[line indexOfNonSeparator].
+
     super cursorReturn.
-    line := self listAt:cursorLine.
-
-    newCol := line size == 0
-                    ifTrue:[newCol]
-                    ifFalse:[line indexOfNonSeparator].
+    newCol := (self leftIndentForLine:cursorLine)+1.
 
     self setCursorCol:newCol.
     self makeCursorVisibleAndShowCursor:wasOn
@@ -329,6 +334,6 @@
 !CodeView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/CodeView.st,v 1.64 2013-05-29 17:15:20 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/CodeView.st,v 1.65 2013-10-18 21:12:49 cg Exp $'
 ! !