diff dwtx/jface/fieldassist/SimpleContentProposalProvider.d @ 70:46a6e0e6ccd4

Merge with d-fied sources of 3.4M7
author Frank Benoit <benoit@tionex.de>
date Thu, 22 May 2008 01:36:46 +0200
parents f12d40e7da8f
children 04b47443bb01
line wrap: on
line diff
--- a/dwtx/jface/fieldassist/SimpleContentProposalProvider.d	Mon May 19 13:41:06 2008 +0200
+++ b/dwtx/jface/fieldassist/SimpleContentProposalProvider.d	Thu May 22 01:36:46 2008 +0200
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Amir Kouchekinia <amir@pyrus.us> - bug 200762
  * Port to the D programming language:
  *     Frank Benoit <benoit@tionex.de>
  *******************************************************************************/
@@ -41,7 +42,7 @@
     private IContentProposal[] contentProposals;
 
     /*
-     * bool that tracks whether filtering is used.
+     * Boolean that tracks whether filtering is used.
      */
     private bool filterProposals = false;
 
@@ -60,7 +61,7 @@
 
     /**
      * Return an array of Objects representing the valid content proposals for a
-     * field. Ignore the current contents of the field.
+     * field. 
      *
      * @param contents
      *            the current contents of the field (only consulted if filtering
@@ -74,7 +75,7 @@
         if (filterProposals) {
             auto list = new ArraySeq!(IContentProposal);
             for (int i = 0; i < proposals.length; i++) {
-                if (proposals[i].length > contents.length
+                if (proposals[i].length >= contents.length
                         && proposals[i].substring(0, contents.length)
                                 .equalsIgnoreCase(contents)) {
                     list.append(makeContentProposal(proposals[i]));