CodeView.st
changeset 4594 ef0af7d8e4c6
parent 4586 0678021a7151
child 4813 938c3cbafe4c
equal deleted inserted replaced
4593:4877adcdf805 4594:ef0af7d8e4c6
    76 ! !
    76 ! !
    77 
    77 
    78 !CodeView class methodsFor:'others'!
    78 !CodeView class methodsFor:'others'!
    79 
    79 
    80 version_CVS
    80 version_CVS
    81     ^ '$Header: /cvs/stx/stx/libwidg/CodeView.st,v 1.63 2013-04-30 18:21:27 cg Exp $'
    81     ^ '$Header: /cvs/stx/stx/libwidg/CodeView.st,v 1.64 2013-05-29 17:15:20 cg Exp $'
    82 ! !
    82 ! !
    83 
    83 
    84 !CodeView methodsFor:'accessing'!
    84 !CodeView methodsFor:'accessing'!
    85 
    85 
    86 explainAction:aBlock
    86 explainAction:aBlock
   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 
   324 ! !
   327 ! !
   325 
   328 
   326 !CodeView class methodsFor:'documentation'!
   329 !CodeView class methodsFor:'documentation'!
   327 
   330 
   328 version
   331 version
   329     ^ '$Header: /cvs/stx/stx/libwidg/CodeView.st,v 1.63 2013-04-30 18:21:27 cg Exp $'
   332     ^ '$Header: /cvs/stx/stx/libwidg/CodeView.st,v 1.64 2013-05-29 17:15:20 cg Exp $'
   330 ! !
   333 ! !
   331 
   334