#REFACTORING by exept
authorClaus Gittinger <cg@exept.de>
Sat, 17 Aug 2019 14:42:40 +0200
changeset 6672 8fa34ec6f874
parent 6671 040921add07a
child 6673 664824a150a6
#REFACTORING by exept class: CodeView changed: #cursorReturn:
CodeView.st
--- a/CodeView.st	Sat Aug 17 12:10:28 2019 +0200
+++ b/CodeView.st	Sat Aug 17 14:42:40 2019 +0200
@@ -120,9 +120,9 @@
 
 cursorReturn:withPossibleAutoindent
     "added an argument to disable autoindent, because this method is called from other
-     places as well..."
+     places as well (especially: the terminal emulator)..."
      
-    |wasOn line newCol |
+    |wasOn newCol|
 
     "/ make Jan's enhancement dependent on
     "/ the autoIndent-flag setting - to avoid confusing
@@ -137,25 +137,16 @@
     or:[ self autoIndent not
     or:[ cursorLine == 1
     or:[ self sensor shiftDown]]]) ifTrue:[
-        super cursorReturn.
+        "/ no autoindent
+        self basicCursorReturn.
         ^ self.
     ].
-    "/ autoIndent
+
+    "/ do autoIndent
 
     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.
+    self basicCursorReturn.
     newCol := (self leftIndentForLine:cursorLine)+1.
 
     self setCursorCol:newCol.