The Inbox: ST80-ct.238.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: ST80-ct.238.mcz

commits-2
A new version of ST80 was added to project The Inbox:
http://source.squeak.org/inbox/ST80-ct.238.mcz

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

Name: ST80-ct.238
Author: ct
Time: 12 August 2019, 2:18:58.027463 pm
UUID: 3f58fb14-d60b-b844-bfff-c5d2ab932033
Ancestors: ST80-pre.236

Do not print invisible characters

Requires Collections-ct.848. Replaces ST80-ct.237!

=============== Diff against ST80-pre.236 ===============

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].
 
  (char = Character tab and: [ self selection notEmpty ]) ifTrue: [ self tabOrIndent: 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].
 
+ char isInvisible
+ ifTrue: [^ true].
  result := self normalCharacter: typeAheadStream.
 
  (')]}' includes: char)
  ifTrue: [self blinkPrevParen: char ].
  ^result!