mirror of
https://github.com/TermiT/Flycut.git
synced 2025-09-12 08:04:30 +08:00
Make search case-insensitive
This commit is contained in:
parent
d51524594b
commit
0328680ae5
1 changed files with 2 additions and 2 deletions
|
@ -364,7 +364,7 @@
|
||||||
enumerator = [subArray objectEnumerator];
|
enumerator = [subArray objectEnumerator];
|
||||||
int index = 0;
|
int index = 0;
|
||||||
while ( aClipping = [enumerator nextObject] ) { // Forward enumerator so we find the most recent N matches
|
while ( aClipping = [enumerator nextObject] ) { // Forward enumerator so we find the most recent N matches
|
||||||
if ([[self clippingContentsAtPosition:index] rangeOfString:search].location != NSNotFound) {
|
if ([[self clippingContentsAtPosition:index] rangeOfString:search options:NSCaseInsensitiveSearch].location != NSNotFound) {
|
||||||
[returnArray insertObject:[aClipping displayString] atIndex:0];
|
[returnArray insertObject:[aClipping displayString] atIndex:0];
|
||||||
howMany--;
|
howMany--;
|
||||||
if (0 == howMany)
|
if (0 == howMany)
|
||||||
|
@ -402,7 +402,7 @@
|
||||||
enumerator = [subArray objectEnumerator];
|
enumerator = [subArray objectEnumerator];
|
||||||
int index = 0;
|
int index = 0;
|
||||||
while ( aClipping = [enumerator nextObject] ) { // Forward enumerator so we find the most recent N matches
|
while ( aClipping = [enumerator nextObject] ) { // Forward enumerator so we find the most recent N matches
|
||||||
if ([[self clippingContentsAtPosition:index] rangeOfString:search].location != NSNotFound) {
|
if ([[self clippingContentsAtPosition:index] rangeOfString:search options:NSCaseInsensitiveSearch].location != NSNotFound) {
|
||||||
[returnArray addObject:[NSNumber numberWithInt:index]];
|
[returnArray addObject:[NSNumber numberWithInt:index]];
|
||||||
howMany--;
|
howMany--;
|
||||||
if (0 == howMany)
|
if (0 == howMany)
|
||||||
|
|
Loading…
Add table
Reference in a new issue