This is an automated email from the git hooks/post-receive script.

ben pushed a commit to branch master
in repository autocomplete.

commit 138ac587c597be14e13978b3a031e64a0d9ea278
Author: bobbylight <[email protected]>
Date:   Sat May 8 19:59:19 2010 +0000

    Code completion window should display a single choice (not auto-complete 
it) if the user has not typed any prefix of it yet.
    Updates to Perl completion for variables.
---
 src/org/fife/ui/autocomplete/AutoCompletion.java |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/org/fife/ui/autocomplete/AutoCompletion.java 
b/src/org/fife/ui/autocomplete/AutoCompletion.java
index dd8ae14..9c540db 100644
--- a/src/org/fife/ui/autocomplete/AutoCompletion.java
+++ b/src/org/fife/ui/autocomplete/AutoCompletion.java
@@ -643,7 +643,8 @@ try {
                // the popup window should be hidden instead of being reset to 
show
                // everything.
                String text = provider.getAlreadyEnteredText(textComponent);
-               if (text==null || text.length()==0) {
+               int textLen = text==null ? 0 : text.length();
+               if (textLen==0) {
                        if (isPopupVisible()) {
                                hidePopupWindow();
                                return getLineOfCaret();
@@ -653,7 +654,7 @@ try {
                final List completions = provider.getCompletions(textComponent);
                int count = completions.size();
 
-               if (count>1 || (count==1 && isPopupVisible()) ||
+               if (count>1 || (count==1 && (isPopupVisible() || textLen==0)) ||
                                (count==1 && !getAutoCompleteSingleChoices())) {
 
                        if (popupWindow==null) {

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-java/autocomplete.git

_______________________________________________
pkg-java-commits mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

Reply via email to