Like many code editors the Tab key is used to select the Highlighted code completion suggestion but in codeblocks (v.20.03 on windows 7 64bit) pressing the Tab key while the desired code completion is highlighted, wrongly completes another code (seemingly the first suggestion, not the highlighted one).
It only works if you first select the highlighted code by pressing the shortcut key Ctrl+Space and then pressing the Tab key that is very inconvinient compared to other modern IDEs since it cannot even be altered in Shortcut plugin.
I have included two screenshots of the process.
Are you able to reliably reproduce this? Can you do this in a file which doesn't include anything and it is part of a minimal project (just a single file)?
Last edit: Teodor Petrov 2020-10-30
Yes, I just tested it in an empty one c file as the attached screenshots show, the problem still exists and regardless of the highlighted suggestion code, the first one in the list is entered into the editor after pressing the Tab key.
I tried another test, this time I browsed through three suggested code completions and selected the middle one, then pressed either Tab or Enter keys and again the first suggested code in the list was entered instead of the selected highlighted one.
It seems to work fine on Linux... So I guess it is a windows only problem. Have you tried a night build?
No, I have not tested the nightly builds. Maybe I try it later, but it would be good if someone could test it on a virtual machine sooner.
Hi,
The other day I was checking my PATH string and I found out that an old installation of mingw was referenced at the end of the path string in "system variables" but the "user variables" was referencing to the updated mingw, and after deleting the old reference, suddenly the code completion was fixed!
I wonder why it was this way since I had the compiler settings set to the new installation of mingw in the "Toolchain executables" of codeblocks (C:\CodeBlocks\MinGW)!
Any way it sometimes again has some problems showing code completion at all where I used some other advice such as:
- closing and opening Codeblocks
- setting and and unsetting the "disable SmartSense" in the code completion plugin
Thank you, the hint regarding the nightly builds was helpful in fixing the problem.