--- a/EditTextView.st Fri Apr 11 18:48:49 2003 +0200
+++ b/EditTextView.st Tue Apr 15 13:57:52 2003 +0200
@@ -3407,9 +3407,8 @@
cursorKeyPress:key shifted:shifted
- |sensor n|
-
- sensor := self sensor.
+ |n|
+
self changeTypeOfSelectionTo:nil.
(key == #CursorRight) ifTrue:[
@@ -3477,16 +3476,12 @@
].
].
- sensor isNil ifTrue:[
- n := 1
- ] ifFalse:[
- n := 1 + (sensor compressKeyPressEventsWithKey:#CursorDown).
- ].
+ n := 1 + (self sensor compressKeyPressEventsWithKey:#CursorDown).
self cursorDown:n.
"/
"/ flush keyboard to avoid runaway cursor
"/
- sensor notNil ifTrue:[self sensor flushKeyboardFor:self].
+ self sensor flushKeyboardFor:self.
^ self
].
(key == #CursorLeft or:[key == #CursorUp]) ifTrue:[
@@ -3541,16 +3536,12 @@
self cursorLeft. ^self
].
(key == #CursorUp) ifTrue:[
- sensor isNil ifTrue:[
- n := 1
- ] ifFalse:[
- n := 1 + (sensor compressKeyPressEventsWithKey:#CursorUp).
- ].
+ n := 1 + (self sensor compressKeyPressEventsWithKey:#CursorUp).
self cursorUp:n.
"/
"/ flush keyboard to avoid runaway cursor
"/
- sensor notNil ifTrue:[sensor flushKeyboardFor:self].
+ self sensor flushKeyboardFor:self.
^ self
].
].
@@ -3575,7 +3566,7 @@
!
handleNonCommandKey:key
- |selStartLine selStartCol selEndLine selEndCol sel word|
+ |selStartLine selStartCol selEndLine selEndCol sel|
self isReadOnly ifTrue:[
self flash.
@@ -3642,7 +3633,7 @@
sensor := self sensor.
5 timesRepeat:[
- (sensor notNil and:[sensor hasKeyPressEventFor:self]) ifFalse:[
+ (sensor hasKeyPressEventFor:self) ifFalse:[
Processor activeProcess millisecondDelay:40.
]
].
@@ -4318,7 +4309,7 @@
<resource: #keyboard (#Again #Copy #Cut #Paste #Accept #Find #GotoLine #SaveAs #Print)>
<resource: #programMenu>
- |items m sub sensor translateItems subSub|
+ |items m sub translateItems subSub|
items := #(
('Again (for All)' multipleAgain )
@@ -4368,7 +4359,7 @@
subSub receiver:self.
sub subMenuAt:#babelFishTranslate put:subSub.
- ((sensor := self sensor) notNil and:[sensor ctrlDown]) ifTrue:[
+ self sensor ctrlDown ifTrue:[
m := sub
] ifFalse:[
items := #(
@@ -4423,20 +4414,21 @@
okText:'Paste'
abortText:'Cancel'
list:list
- action:[:idx | idx notNil ifTrue:[ sel := history at:idx]].
+ action:[:idx | idx notNil ifTrue:[sel := history at:idx]].
box useIndex:true.
box show.
- ^ sel.
+ ^ sel.
!
getTextSelectionOrTextSelectionFromHistory
- device shiftDown ifTrue:[
+
+ self sensor shiftDown ifTrue:[
^ self getTextSelectionFromHistory
].
"/ return either the (xterm-) selection or the clipBoard
^ self
- getTextSelection:(device ctrlDown
+ getTextSelection:(self sensor ctrlDown
ifTrue:#selection
ifFalse:#clipboard)
!
@@ -5433,15 +5425,13 @@
]
ifAbsent:
[
- |sensor|
-
- (sensor := self sensor) notNil ifTrue:[
- sensor compressKeyPressEventsWithKey:#Again.
- ].
+ self sensor compressKeyPressEventsWithKey:#Again.
self showNotFound.
selectStyle := savedSelectStyle.
^ false
- ]
+ ].
+
+ ^ true.
"Modified: 9.10.1996 / 16:14:11 / cg"
!
@@ -5464,5 +5454,5 @@
!EditTextView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/EditTextView.st,v 1.300 2003-04-04 08:57:27 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/EditTextView.st,v 1.301 2003-04-15 11:57:08 stefan Exp $'
! !