--- a/EditTextView.st Sat Jan 08 18:22:54 1994 +0100
+++ b/EditTextView.st Sat Jan 08 18:24:13 1994 +0100
@@ -31,7 +31,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/EditTextView.st,v 1.7 1993-12-20 17:23:59 claus Exp $
+$Header: /cvs/stx/stx/libwidg/EditTextView.st,v 1.8 1994-01-08 17:24:08 claus Exp $
written jun-89 by claus
'!
@@ -109,7 +109,7 @@
'-'
'accept'
'-'
- 'others ...'
+ 'others'
).
self middleButtonMenu:(PopUpMenu
@@ -132,7 +132,7 @@
for:self).
middleButtonMenu subMenuAt:#others put:(PopUpMenu
- labels:#(
+ labels:(resources array:#(
'search'
'goto'
'-'
@@ -142,9 +142,9 @@
'-'
'indent'
'-'
- 'save as ..'
+ 'save as ...'
'print'
- )
+ ))
selectors:#(
search
gotoLine
@@ -1514,14 +1514,12 @@
self deleteSelection.
lastReplacement notNil ifTrue:[
self insertLines:lastReplacement asText withCr:false.
- self selectFromLine:l col:c
- toLine:cursorLine col:(cursorCol - 1).
+ self selectFromLine:l col:c toLine:cursorLine col:(cursorCol - 1).
].
^ true
].
- self searchForwardFor:s startingAtLine:cursorLine col:cursorCol
- ifFound:[:line :col |
+ self searchForwardFor:s startingAtLine:cursorLine col:cursorCol ifFound:[:line :col |
self selectFromLine:line col:col
toLine:line col:(col + s size - 1).
self makeLineVisible:line.
@@ -1530,8 +1528,7 @@
self deleteSelection.
lastReplacement notNil ifTrue:[
self insertLines:lastReplacement asText withCr:false.
- self selectFromLine:line col:col
- toLine:cursorLine col:(cursorCol - 1).
+ self selectFromLine:line col:col toLine:cursorLine col:(cursorCol - 1).
].
^ true
] else:[
@@ -1583,9 +1580,12 @@
!
paste
- "paste copybuffer at cursor; if there is a selection, replace it"
+ "paste copybuffer; if there is a selection, replace it.
+ otherwise paste at cursor position. Replace is not done
+ for selections originating by a paste, to allow multiple
+ paste."
- self selection notNil ifTrue:[
+ (self selection notNil and:[typeOfSelection ~~ #paste]) ifTrue:[
^ self replace
].
self paste:(Smalltalk at:#CopyBuffer).
@@ -1595,7 +1595,7 @@
"replace selection by copybuffer"
|selected selectedString replacement replacementString
- cutOffSpace addSpace t|
+ cutOffSpace addSpace|
selected := self selection.
selected isNil ifTrue:[