--- a/ListView.st Sat May 07 06:52:44 2016 +0200
+++ b/ListView.st Mon May 09 21:43:19 2016 +0200
@@ -2854,7 +2854,7 @@
getFontParameters
"get some info of the used font. They are cached since we use them often ..
- The code below uses the fonts average height parameters - these
+ The code below uses the font's average height parameters - these
are not OK for some oversized national characters (such as A-dieresis).
Therefore, this method should be redefined in views which will be used
with national characters (i.e. editTextViews)."
@@ -4810,7 +4810,7 @@
and:[ (self findEndOfWordAtLine:lnr col:col) == (col + patternSize - 1) ]]
) ifTrue:[
(atBeginOfLineOnly not or:[col == 1]) ifTrue:[
- ^ block1 value:lnr value:col.
+ ^ block1 value:lnr value:col optionalArgument:nil.
]
]
].
@@ -4873,7 +4873,7 @@
searchForwardUsingSpec:searchSpec startingAtLine:startLine col:startCol ifFound:block1 ifAbsent:block2
"search for a pattern, if found evaluate block1 with row/col as arguments,
if not found evaluate block2.
- If the block is a three-arg block, it gets the end-col (or nil, if not found)"
+ If the block is a three-arg block, it gets the end-col (or nil, if not known)"
|lineString col pattern match regexMatch ignCase fullWord atBeginOfLineOnly
wrapAtEndOfText patternSize matcher lnr "{Class: SmallInteger}"
@@ -4884,6 +4884,10 @@
pattern := searchSpec pattern.
match := searchSpec match.
regexMatch := searchSpec regexMatch.
+ (match and:[regexMatch not]) ifTrue:[
+ pattern := pattern globPatternAsRegexPattern.
+ regexMatch := true.
+ ].
ignCase := searchSpec ignoreCase.
fullWord := searchSpec fullWord.
atBeginOfLineOnly := searchSpec atBeginOfLineOnly.
@@ -4943,7 +4947,7 @@
^ block1 value:lnr value:foundCol optionalArgument:endCol.
]]]]]].
] ifFalse:[
- (match and:[regexMatch or:[pattern includesUnescapedMatchCharacters]]) ifTrue:[
+ (match and:[pattern includesUnescapedMatchCharacters]) ifTrue:[
"perform a findMatchString (glob matching)"
p := pattern species new:0.
(pattern startsWith:$*) ifFalse:[p := p , '*'].
@@ -4967,6 +4971,9 @@
] ifFalse:[
"perform a findString (no matching)"
p := pattern.
+ (match and:[pattern includesMatchCharacters]) ifTrue:[
+ p := pattern withoutMatchEscapes
+ ].
runner
value:[:lnr :col :lineString |
foundCol := lineString
@@ -5275,8 +5282,8 @@
^ atBeginOfLineOnly ? false
!
-atBeginOfLineOnly:something
- atBeginOfLineOnly := something.
+atBeginOfLineOnly:aBoolean
+ atBeginOfLineOnly := aBoolean.
!
forward
@@ -5391,11 +5398,11 @@
!
regexMatch
- ^ regexMatch
-!
-
-regexMatch:something
- regexMatch := something.
+ ^ regexMatch ? false
+!
+
+regexMatch:aBoolean
+ regexMatch := aBoolean.
!
variable