112 |
112 |
113 cursorReturn |
113 cursorReturn |
114 |wasOn line newCol | |
114 |wasOn line newCol | |
115 |
115 |
116 "/ make Jan's enhancement dependent on |
116 "/ make Jan's enhancement dependent on |
117 "/ the st80EditMode-flag setting - to avoid confusing |
117 "/ the autoIndent-flag setting - to avoid confusing |
118 "/ those who are used to the old behavior. |
118 "/ those who are used to the old behavior. |
119 "/ for Jan: |
119 "/ for Jan: |
120 "/ st80EditMode is configured in the settings-Editor dialog |
120 "/ autoIndent is configured in the settings-Editor dialog (for all new editors) |
|
121 "/ or in the per-editor popup menu (misc) |
|
122 "/ |
121 "/ and saved/restored with the userPreferences. |
123 "/ and saved/restored with the userPreferences. |
122 |
124 |
123 (self st80EditMode not |
125 (autoIndent "self st80EditMode" not |
124 or:[cursorLine == 1]) ifTrue:[ |
126 or:[ cursorLine == 1 |
|
127 or:[ self sensor shiftDown]]) ifTrue:[ |
125 super cursorReturn. |
128 super cursorReturn. |
126 ^ self. |
129 ^ self. |
127 ]. |
130 ]. |
|
131 |
128 wasOn := self hideCursor . |
132 wasOn := self hideCursor . |
129 line := self listAt:cursorLine. |
133 line := self listAt:cursorLine. |
130 newCol := line size == 0 |
134 newCol := line size == 0 |
131 ifTrue:[1] |
135 ifTrue:[1] |
132 ifFalse:[line indexOfNonSeparator]. |
136 ifFalse:[line indexOfNonSeparator]. |
133 super cursorReturn. |
137 super cursorReturn. |
134 line := self listAt:cursorLine. |
138 line := self listAt:cursorLine. |
135 |
|
136 |
139 |
137 newCol := line size == 0 |
140 newCol := line size == 0 |
138 ifTrue:[newCol] |
141 ifTrue:[newCol] |
139 ifFalse:[line indexOfNonSeparator]. |
142 ifFalse:[line indexOfNonSeparator]. |
140 |
143 |