[Pkg] The Trunk: ST80-nice.131.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Aug 3 15:39:16 UTC 2011
Nicolas Cellier uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-nice.131.mcz
==================== Summary ====================
Name: ST80-nice.131
Author: nice
Time: 3 August 2011, 5:38:51.551 pm
UUID: a95fbf37-a396-48dd-951d-e64e664a0d29
Ancestors: ST80-cmm.130
cosmetic: use self normalCharacter: rather than self perform: #normalCharacter:
=============== Diff against ST80-cmm.130 ===============
Item was changed:
----- Method: ParagraphEditor>>dispatchOnCharacter:with: (in category 'parenblinking') -----
dispatchOnCharacter: char with: typeAheadStream
"Carry out the action associated with this character, if any.
Type-ahead is passed so some routines can flush or use it."
| honorCommandKeys result |
self clearParens.
"mikki 1/3/2005 21:31 Preference for auto-indent on return added."
char asciiValue = 13 ifTrue: [
^Preferences autoIndent
ifTrue: [
sensor controlKeyPressed
ifTrue: [self normalCharacter: typeAheadStream]
ifFalse: [self crWithIndent: typeAheadStream]]
ifFalse: [
sensor controlKeyPressed
ifTrue: [self crWithIndent: typeAheadStream]
ifFalse: [self normalCharacter: typeAheadStream]]].
((honorCommandKeys := Preferences cmdKeysInText) and: [char = Character enter])
ifTrue: [^ self dispatchOnEnterWith: typeAheadStream].
"Special keys overwrite crtl+key combinations - at least on Windows. To resolve this
conflict, assume that keys other than cursor keys aren't used together with Crtl."
((self class specialShiftCmdKeys includes: char asciiValue) and: [char asciiValue < 27])
ifTrue: [^ sensor controlKeyPressed
ifTrue: [self perform: (ShiftCmdActions at: char asciiValue + 1) with: typeAheadStream]
ifFalse: [self perform: (CmdActions at: char asciiValue + 1) with: typeAheadStream]].
"backspace, and escape keys (ascii 8 and 27) are command keys"
((honorCommandKeys and: [sensor commandKeyPressed]) or: [self class specialShiftCmdKeys includes: char asciiValue]) ifTrue:
[^ sensor leftShiftDown
ifTrue:
[self perform: (ShiftCmdActions at: char asciiValue + 1 ifAbsent: [#noop:]) with: typeAheadStream]
ifFalse:
[self perform: (CmdActions at: char asciiValue + 1 ifAbsent: [#noop:]) with: typeAheadStream]].
"the control key can be used to invoke shift-cmd shortcuts"
(honorCommandKeys and: [sensor controlKeyPressed])
ifTrue:
[^ self perform: (ShiftCmdActions at: char asciiValue + 1 ifAbsent: [#noop:]) with: typeAheadStream].
+ result := self normalCharacter: typeAheadStream.
-
- result := self perform: #normalCharacter: with: typeAheadStream.
(')]}' includes: char)
ifTrue: [self blinkPrevParen: char ].
^result!
More information about the Packages
mailing list