[squeak-dev] The Trunk: Morphic-cmm.988.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Jun 9 22:50:19 UTC 2015


Chris Muller uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-cmm.988.mcz

==================== Summary ====================

Name: Morphic-cmm.988
Author: cmm
Time: 9 June 2015, 5:49:27.528 pm
UUID: 5355a2fc-cc89-418d-ab6c-7bf0d238de76
Ancestors: Morphic-mt.987

Remove duplicate check.

=============== Diff against Morphic-mt.987 ===============

Item was changed:
  ----- Method: TextEditor>>autoEncloseFor: (in category 'typing support') -----
  autoEncloseFor: typedChar 
  	"Answer whether typeChar was handled by auto-enclosure.  Caller should call normalCharacter if not."
  	| openers closers |
  	openers := '([{'.
  	closers := ')]}'.
+ 	(closers includes: typedChar) ifTrue:
+ 		[ | pos |
+ 		self blinkPrevParen: typedChar.
+ 		((pos := self indexOfNextNonwhitespaceCharacter) notNil and: [ (paragraph string at: pos) = typedChar ])
+ 			ifTrue:
+ 				[ self
+ 					moveCursor: [ : position | position + pos - pointBlock stringIndex + 1 ]
+ 					forward: true
+ 					select: false.
+ 				^ true ]
+ 			ifFalse: [ ^ false ] ].
- 	(closers includes: typedChar)
- 		ifTrue:
- 			[ | pos |
- 			self blinkPrevParen: typedChar.
- 			((pos := self indexOfNextNonwhitespaceCharacter) notNil and: [ (paragraph string at: pos) = typedChar ])
- 				ifTrue:
- 					[ (paragraph string at: pos) = typedChar ifTrue:
- 						[ self
- 							moveCursor: [ : position | position + pos - pointBlock stringIndex + 1 ]
- 							forward: true
- 							select: false ].
- 					^ true ]
- 				ifFalse: [ ^ false ] ].
  	(self class autoEnclose and: [ openers includes: typedChar ]) ifTrue:
  		[ self
  			 addString: (closers at: (openers indexOf: typedChar)) asString ;
  			 insertTypeAhead ;
  			
  			moveCursor: [ : position | position - 1 ]
  			forward: false
  			select: false.
  		^ false ].
  	^ false!



More information about the Squeak-dev mailing list