The Trunk: ST80-cmm.181.mcz

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

The Trunk: ST80-cmm.181.mcz

commits-2
Chris Muller uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-cmm.181.mcz

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

Name: ST80-cmm.181
Author: cmm
Time: 21 April 2015, 9:33:44.003 pm
UUID: b51ef110-93a5-4fdd-aded-8566f530b5a9
Ancestors: ST80-cmm.180

Let forward delete be useful for joining lines.

=============== Diff against ST80-cmm.180 ===============

Item was changed:
  ----- Method: ParagraphEditor>>forwardDelete: (in category 'typing/selecting keys') -----
  forwardDelete: characterStream
  "Delete forward over the next character.
   Make Undo work on the whole type-in, not just the one char.
  wod 11/3/1998: If there was a selection use #zapSelectionWith: rather than #backspace: which was 'one off' in deleting the selection. Handling of things like undo or typeIn area were not fully considered."
  | startIndex usel upara uinterval ind stopIndex |
  startIndex := self mark.
  startIndex > paragraph text size ifTrue:
  [sensor keyboard.
  ^ false].
  self hasSelection ifTrue:
  ["there was a selection"
  sensor keyboard.
  self zapSelectionWith: self nullText.
  ^ false].
  "Null selection - do the delete forward"
  beginTypeInBlock == nil "no previous typing.  openTypeIn"
  ifTrue: [self openTypeIn. UndoSelection := self nullText].
  uinterval := UndoInterval deepCopy.
  upara := UndoParagraph deepCopy.
  stopIndex := startIndex.
  (sensor keyboard asciiValue = 127 and: [sensor leftShiftDown])
+ ifTrue: [stopIndex := (self firstWordBoundaryAfter: stopIndex) - 1].
- ifTrue: [stopIndex := (self nextWord: stopIndex) - 1].
  self selectFrom: startIndex to: stopIndex.
  self replaceSelectionWith: self nullText.
  self selectFrom: startIndex to: startIndex-1.
  UndoParagraph := upara.  UndoInterval := uinterval.
  UndoMessage selector == #noUndoer ifTrue: [
  (UndoSelection isText) ifTrue: [
  usel := UndoSelection.
  ind := startIndex. "UndoInterval startIndex"
  usel replaceFrom: usel size + 1 to: usel size with:
  (UndoParagraph text copyFrom: ind to: ind).
  UndoParagraph text replaceFrom: ind to: ind with:
  self nullText]].
  ^false!