Could not show completion list as expected on line 1 and 2.
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / phpeditor / php / PHPCompletionProcessor.java
index 4f364ff..ebca77f 100644 (file)
@@ -247,14 +247,14 @@ public class PHPCompletionProcessor implements IContentAssistProcessor {
                        int j = start;
                        if (j != 0) {
                                char ch;
-                               while (j-- > 0) {
-                                       ch = document.getChar(j);
+                               while (j > 0) {
+                                       ch = document.getChar(--j);
                                        if (ch == '\n') {
                                                break;
                                        }
                                }
-                               while (j-- > 0) {
-                                       ch = document.getChar(j);
+                               while (j > 0) {
+                                       ch = document.getChar(--j);
                                        if (ch == '\n') {
                                                break;
                                        }