Version: 5.7.1, 5.8.0
OS version: Windows 7 64, Windows 8.1 64
Error reported: See below
Stack trace: None
Steps needed to reproduce the problem:
I found an interesting behavioral event stemming from the code completion box. Using Dev-C++ 5.8.0 Portable on Windows 7 SP1 64-bit, I can cause the code completion window to offer code completion for a different portion of code by clicking away from the scope resolution operation (a . or ->) before the code completion window appears.
For example, I have struct a with members b and c and struct d with members e and f. I have a piece of code that has a.b referenced in it. I am typing a d.e, but when I type the . after d, I click to move the cursor to after the period in the a.b instruction. Code completion offers me b and c as code completion options. Variations on where one clicks to offer different scope resolutions. Clicking on a in the above scenario would populate the code completion popup with struct a (but not its members). Clicking to the middle of a deference resolution (between the - and >) causes code completion for all preprocessors, variables, classes, enums, etc. scoped to that location. Any selected code completion occurs at the second location (where the cursor was moved to before the popup appeared).
I realize this may be a low priority; it doesn't appear to break anything (unless you create syntax errors or otherwise knowingly overwrite code [in the example, I could have selected c in the code completion and turned a.b into a.c]) and doesn't occur unless you really try to make it happen (or really don't want the code completion popup at that moment).
Perhaps the best solution to this would be to not show the code completion popup if the user moves the text cursor between the code completion request and its loading.
I tested Visual Studio 2013 for this behavior and it simply didn't load the code completion box under these circumstances (although it was C# ASP.NET code I was testing on there; Visual Studio is so monolithic its hard to tell if the same behavior would occur if I tried using C++).
NOTE: This may work on other operating systems, I haven't tested it anywhere else yet.
Diff:
I've verified this behavior on my development machine. As SilverNexus mentioned, it probably has a low impact for most people since it's difficult to reproduce (at least on my machine). Probably also a small effort to fix.
Thanks for reporting it!
Last edit: Matthew MacGregor 2014-10-29
Fixed as of 5.8.1.
For those interested, the quite easy fix is implemented using fCompletionInitialPosition.
The fix can be seen here:
https://sourceforge.net/p/orwelldevcpp/code/ci/master/tree/Source/Editor.pas
Look for "fCompletionInitialPosition".