Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
annoying crash when debugging CC's auto-suggestion
MortenMacFly:
--- Quote from: p2rkw on January 04, 2013, 04:29:31 pm ---Can you test this patch?
--- End quote ---
Where in this patch is the window finally being destroyed? Shouldn't this be done in the destructor, at least?
p2rkw:
--- Quote ---That said, the filtering is currently forced to re-build the box, so there are brief pauses when it disappears, then reappears.
--- End quote ---
With patch from my previous post autocomplete window is recreated only when its have to be shown in another window (i.e when user opens another file)
--- Quote ---will launch the box, and typing auto-launch + 4 more:
--- End quote ---
That's true, but list will be refreshed only once, my proposition is:
--- Code: ---Index: src/plugins/codecompletion/codecompletion.cpp
===================================================================
--- src/plugins/codecompletion/codecompletion.cpp (wersja 8739)
+++ src/plugins/codecompletion/codecompletion.cpp (kopia robocza)
@@ -1619,7 +1807,7 @@
}
// code completion
- else if ( (autoCC && !control->AutoCompActive()) // not already active autocompletion
+ else if ( (autoCC && (((pos - wordStartPos) % m_CCAutoLaunchChars) == 0)) // Refresh box every m_CCAutoLaunchChars letters
|| (prevChar == _T('"')) // #include "
|| (prevChar == _T('<')) // #include <
|| (ch == _T('.'))
@@ -1629,8 +1817,7 @@
|| ( (ch == _T(':')) // ::
&& (prevChar == _T(':')) )
|| ( control->AutoCompActive() // refine listing:
- && ( ch == _T('/') // for #include (reduce directories)
- || (pos - wordStartPos == m_CCAutoLaunchChars + 4)) ) // for more typed characters
+ && ( ch == _T('/') )) // for #include (reduce directories)
)
{
int style = control->GetStyleAt(pos);
--- End code ---
This approach refreshes box every 'm_CCAutoLaunchChars' typed characters.
--- Quote ---Where in this patch is the window finally being destroyed?
--- End quote ---
AutoComplete::~AutoComplete() calls Window::Destroy() - window is destroyed there (see code at first post).
oBFusCATed:
Why not:
--- Code: --- else if ( (autoCC && (((pos - wordStartPos) >= m_CCAutoLaunchChars))
--- End code ---
MortenMacFly:
--- Quote from: p2rkw on January 04, 2013, 06:38:13 pm ---
--- Quote ---Where in this patch is the window finally being destroyed?
--- End quote ---
AutoComplete::~AutoComplete() calls Window::Destroy() - window is destroyed there (see code at first post).
--- End quote ---
OK then - I was just looking at the patch...
p2rkw:
@oBFusCATed: some of users may dislike that list is refreshed every single key press, especially those who type fast and have older machines :)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version