--- a/TextView.st Tue Sep 15 19:06:54 1998 +0200
+++ b/TextView.st Fri Sep 18 14:46:43 1998 +0200
@@ -19,7 +19,7 @@
externalEncoding contentsWasSaved'
classVariableNames:'DefaultViewBackground DefaultSelectionForegroundColor
DefaultSelectionBackgroundColor MatchDelayTime
- WordSelectCatchesBlanks ST80Selections'
+ WordSelectCatchesBlanks ST80Selections LastSearchPatterns'
poolDictionaries:''
category:'Views-Text'
!
@@ -1373,7 +1373,9 @@
(searchBox addTextLabel:(resources at:'searchPattern:')) adjust:#left.
searchBox addVerticalSpace.
searchBox leftIndent:ViewSpacing; rightIndent:ViewSpacing.
- patternField := searchBox addInputFieldOn:(stringHolder := '' asValue).
+"/ patternField := searchBox addInputFieldOn:(stringHolder := '' asValue).
+ patternField := searchBox addComboBoxOn:(stringHolder := '' asValue) tabable:true.
+ patternField list:LastSearchPatterns.
searchBox addVerticalSpace.
searchBox addCheckBox:(resources string:'ignore case') on:(caseHolder := ign asValue).
searchBox addVerticalSpace.
@@ -1408,8 +1410,20 @@
searchBox accepted ifTrue:[
pattern := stringHolder value.
- pattern := pattern withoutSeparators. "/ is that a good idea ?
+ pattern := pattern string withoutSeparators. "/ is that a good idea ?
pattern notEmpty ifTrue:[
+ LastSearchPatterns isNil ifTrue:[
+ LastSearchPatterns := OrderedCollection new.
+ ].
+ (LastSearchPatterns includes:pattern) ifTrue:[
+ LastSearchPatterns remove:pattern.
+ ] ifFalse:[
+ LastSearchPatterns size > 10 ifTrue:[
+ LastSearchPatterns removeFirst
+ ]
+ ].
+ LastSearchPatterns addFirst:pattern.
+
ign := caseHolder value.
fwd ifFalse:[
self searchBwd:pattern ignoreCase:ign.
@@ -1438,7 +1452,7 @@
"/ ].
"/ searchBox showAtPointer
- "Modified: / 31.3.1998 / 11:25:32 / cg"
+ "Modified: / 17.9.1998 / 16:01:32 / cg"
! !
!TextView methodsFor:'private'!
@@ -2872,5 +2886,5 @@
!TextView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.122 1998-09-08 20:09:00 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.123 1998-09-18 12:46:43 cg Exp $'
! !