OSDN Git Service
(root)
/
neighbornote
/
NeighborNote.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
50ce5c9
)
Correct issues with searching not showing the correct results.
author
Randy Baumgarte
<randy@fbn.cx>
Tue, 20 Mar 2012 13:56:47 +0000
(09:56 -0400)
committer
Randy Baumgarte
<randy@fbn.cx>
Tue, 20 Mar 2012 13:56:47 +0000
(09:56 -0400)
src/cx/fbn/nevernote/sql/REnSearch.java
patch
|
blob
|
history
diff --git
a/src/cx/fbn/nevernote/sql/REnSearch.java
b/src/cx/fbn/nevernote/sql/REnSearch.java
index
cec989a
..
7534d6b
100644
(file)
--- a/
src/cx/fbn/nevernote/sql/REnSearch.java
+++ b/
src/cx/fbn/nevernote/sql/REnSearch.java
@@
-130,13
+130,16
@@
public class REnSearch {
if (tagNames.size() == 0 && !negative)
\r
return false;
\r
\r
if (tagNames.size() == 0 && !negative)
\r
return false;
\r
\r
+ boolean matchFound = false;
\r
for (int i=0; i<tagNames.size(); i++) {
\r
boolean matches = Pattern.matches(filterName.toLowerCase(),tagNames.get(i).toLowerCase());
\r
for (int i=0; i<tagNames.size(); i++) {
\r
boolean matches = Pattern.matches(filterName.toLowerCase(),tagNames.get(i).toLowerCase());
\r
- if (!matches && !negative)
\r
- return false;
\r
- if (matches && negative)
\r
- return false;
\r
+ if (matches)
\r
+ matchFound = true;
\r
}
\r
}
\r
+ if (negative)
\r
+ matchFound = !matchFound;
\r
+ if (!matchFound)
\r
+ return false;
\r
}
\r
return true;
\r
}
\r
}
\r
return true;
\r
}
\r
@@
-541,7
+544,7
@@
public class REnSearch {
return false;
\r
boolean returnTodo = false;
\r
while (pos > -1) {
\r
return false;
\r
boolean returnTodo = false;
\r
while (pos > -1) {
\r
- int endPos = n.getContent().indexOf("
/
>", pos);
\r
+ int endPos = n.getContent().indexOf(">", pos);
\r
String segment = n.getContent().substring(pos, endPos);
\r
boolean currentState;
\r
if (segment.toLowerCase().indexOf("checked=\"true\"") == -1)
\r
String segment = n.getContent().substring(pos, endPos);
\r
boolean currentState;
\r
if (segment.toLowerCase().indexOf("checked=\"true\"") == -1)
\r