Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Green2012-03-07 17:05:06 -0500
committerDavid Green2012-03-07 17:07:11 -0500
commitb585b6bb9e24dbde22a97a46ce45dbd5d7ce8f68 (patch)
treee831025e1d133982e091156d7b3a5cc27f02b009 /org.eclipse.mylyn.tasks.index.ui/src
parent87996045f1f408aed57e9d4f4595fb25fd280a9e (diff)
downloadorg.eclipse.mylyn.tasks-b585b6bb9e24dbde22a97a46ce45dbd5d7ce8f68.tar.gz
org.eclipse.mylyn.tasks-b585b6bb9e24dbde22a97a46ce45dbd5d7ce8f68.tar.xz
org.eclipse.mylyn.tasks-b585b6bb9e24dbde22a97a46ce45dbd5d7ce8f68.zip
373178: content assist for search index does not handle completions with spaces properly
https://bugs.eclipse.org/bugs/show_bug.cgi?id=373178
Diffstat (limited to 'org.eclipse.mylyn.tasks.index.ui/src')
-rw-r--r--org.eclipse.mylyn.tasks.index.ui/src/org/eclipse/mylyn/internal/tasks/index/ui/IndexSearchHandler.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.mylyn.tasks.index.ui/src/org/eclipse/mylyn/internal/tasks/index/ui/IndexSearchHandler.java b/org.eclipse.mylyn.tasks.index.ui/src/org/eclipse/mylyn/internal/tasks/index/ui/IndexSearchHandler.java
index 9375dfe28..f6ea71a7f 100644
--- a/org.eclipse.mylyn.tasks.index.ui/src/org/eclipse/mylyn/internal/tasks/index/ui/IndexSearchHandler.java
+++ b/org.eclipse.mylyn.tasks.index.ui/src/org/eclipse/mylyn/internal/tasks/index/ui/IndexSearchHandler.java
@@ -152,7 +152,10 @@ public class IndexSearchHandler extends AbstractSearchHandler {
for (String address : addresses) {
if (address.startsWith(prefix)) {
- proposals.add(new ContentProposal(address.substring(prefix.length()), address, null));
+ String proposalContent = address.substring(prefix.length());
+ proposalContent = proposalContent.replaceAll(
+ "([+&\\|!\\(\\)\\{\\}\\[\\]^\"~\\*\\?:\\\\ -])", "\\\\$1"); //$NON-NLS-1$//$NON-NLS-2$
+ proposals.add(new ContentProposal(proposalContent, address, null));
}
}
}

Back to the top