User forums > Using Code::Blocks
Code completion occurring inside comments
zabzonk:
Further investigation indicates that the behaviour is actually quite bizarre. If I create a new header file in a console project and start adding C++-style comments (but nothing else - no actual code), then the first word that can cause CC to fire will do so. So, if I enter;
--- Code: ---// this
--- End code ---
then the code completion list pops up for "this", and for any other completable words as type them. If I enter a newline, then it seems the behaviour goes back to normal, and no CC takes place in the comment. So it looks like the code for IsComment() may be a bit buggy.
ollydbg:
--- Quote from: Neil Butterworth on February 20, 2013, 03:50:02 pm ---...So it looks like the code for IsComment() may be a bit buggy.
--- End quote ---
I agree with you, you can report to scintilla :).
danselmi:
IsComment(style) is part of cbStyledTextCtrl not scintilla!
Jenna:
--- Quote from: danselmi on February 20, 2013, 04:12:13 pm ---IsComment(style) is part of cbStyledTextCtrl not scintilla!
--- End quote ---
The problem is the control->GetStyleAt() function, that always returns 0 as style for the last position of a document.
And that's a Scintilla issue.
zabzonk:
Is this a new Scintilla issue? Because I'm pretty positive it didn't happen prior to C::B 12.11.
Edit: Oh, yes it does (just tested it) - I wonder why I've never noticed it before?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version