--- a/ETxtView.st Mon Oct 10 04:03:47 1994 +0100
+++ b/ETxtView.st Fri Oct 28 04:25:37 1994 +0100
@@ -32,7 +32,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/Attic/ETxtView.st,v 1.15 1994-10-10 03:01:00 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/ETxtView.st,v 1.16 1994-10-28 03:24:52 claus Exp $
'!
!EditTextView class methodsFor:'documentation'!
@@ -53,7 +53,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/Attic/ETxtView.st,v 1.15 1994-10-10 03:01:00 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/ETxtView.st,v 1.16 1994-10-28 03:24:52 claus Exp $
"
!
@@ -97,8 +97,8 @@
!EditTextView class methodsFor:'defaults'!
updateStyleCache
- DefaultCursorForegroundColor := StyleSheet at:'textCursorForegroundColor'.
- DefaultCursorBackgroundColor := StyleSheet at:'textCursorBackgroundColor'.
+ DefaultCursorForegroundColor := StyleSheet colorAt:'textCursorForegroundColor'.
+ DefaultCursorBackgroundColor := StyleSheet colorAt:'textCursorBackgroundColor'.
DefaultCursorType := StyleSheet at:'textCursorType' default:#block.
! !
@@ -1822,10 +1822,11 @@
cut
"cut selection into copybuffer"
- |line col history|
-
- lastString := self selection.
- lastString notNil ifTrue:[
+ |line col history sel|
+
+ sel := self selection.
+ sel notNil ifTrue:[
+ lastString := sel.
line := selectionStartLine.
col := selectionStartCol.
undoAction := [self insertLines:lastString atLine:line col:col].
@@ -1851,6 +1852,11 @@
"
self deleteSelection.
lastReplacement := nil
+ ] ifFalse:[
+ "
+ a cut without selection will search&cut again
+ "
+ self again
]
!
@@ -2141,8 +2147,17 @@
searchBwd:pattern
"do the backward search"
+ |startLine startCol|
+
cursorLine isNil ifTrue:[^ self].
- self searchBackwardFor:pattern startingAtLine:(cursorLine min:list size) col:cursorCol
+ selectionStartLine notNil ifTrue:[
+ startLine := selectionStartLine.
+ startCol := selectionStartCol
+ ] ifFalse:[
+ startLine := cursorLine min:list size.
+ startCol := cursorCol
+ ].
+ self searchBackwardFor:pattern startingAtLine:startLine col:startCol
ifFound:[:line :col |
self cursorLine:line col:col.
self selectFromLine:line col:col