Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => CodeCompletion redesign => Topic started by: blueshake on August 27, 2009, 03:56:49 am

Title: codecomletin problem
Post by: blueshake on August 27, 2009, 03:56:49 am
hello,
did anybody find that when the codecompletion is activated and you type "."
then the member list will not show.
see the attachment.
i think this patch will help.
Code
Index: codecompletion.cpp
===================================================================
--- codecompletion.cpp (revision 5744)
+++ codecompletion.cpp (working copy)
@@ -1937,7 +1937,9 @@
 //        Manager::Get()->GetLogManager()->DebugLog(_T("wxEVT_SCI_KEY"));
 //    else if (event.GetEventType() == wxEVT_SCI_MODIFIED)
 //        Manager::Get()->GetLogManager()->DebugLog(_T("wxEVT_SCI_MODIFIED"));
-
+    if (event.GetKey() == '.')
+        if (control->AutoCompActive())
+            control->AutoCompCancel();
     if (event.GetEventType() == wxEVT_SCI_CHARADDED &&
         !control->AutoCompActive()) // not already active autocompletion
     {
any comment will be welcomed

[attachment deleted by admin]
Title: Re: codecomletin problem
Post by: blueshake on August 27, 2009, 11:25:58 am
let me describle this problem again.
here is the test codes.
Code
#include <iostream>

using namespace std;
class pt
{
    int x;
    int y;
};
int main()
{
    pt pp;
    |
    cout << "Hello world!" << endl;
    return 0;
}

in the "|" position ,you type pp and the codecompletion showed (see the attachment above)
and you continue to type the char "." (notice the codecompletion still show) .
here the class pt's members is excepted to be show.but nothing show here.
so this patch can solve the problem.
Title: Re: codecomletin problem
Post by: ollydbg on August 27, 2009, 12:14:28 pm
I have applied this patch in my local copy.

And it works!!!

Thanks! :D