User forums > Using Code::Blocks

EditorTweaks: new option 'Convert Matching Braces' : little bug

<< < (9/12) > >>

MortenMacFly:

--- Quote from: dmoore on November 03, 2012, 07:21:31 pm ---Tested and works well enough for me.

--- End quote ---
It doesn't compile under wx2.9.x. this line:
if (GetCharAt(nextPos) != braces[closeIdx] || BraceMatch(nextPos) != wxNOT_FOUND)

...raises:
cbstyledtextctrl.cpp:356:54: error: ambiguous overload for 'operator!=' in '((cbStyledTextCtrl*)this)->cbStyledTextCtrl::<anonymous>.wxScintilla::GetCharAt(nextPos) != braces.wxString::operator[](((int)closeIdx))'


This should be fixed before committing...

Alpha:
I do not currently have wx2.9 available for testing; does a cast fix this?

if ((wxChar)GetCharAt(nextPos) != braces[closeIdx] || BraceMatch(nextPos) != wxNOT_FOUND)

MortenMacFly:

--- Quote from: Alpha on November 05, 2012, 01:32:44 am ---if ((wxChar)GetCharAt(nextPos) != braces[closeIdx] || BraceMatch(nextPos) != wxNOT_FOUND)

--- End quote ---
Yes. Not nice and I don't know if it would work for all Unicode characters... but yes. :-)

MortenMacFly:

--- Quote from: Alpha on November 03, 2012, 01:51:27 am ---Attached I have re-factored to cbStyledTextCtrl (plus a slight improvement to brace completion).

--- End quote ---
Oh dear... I'm afraid I just screwed the compatibility with the patch after the last commits of mine (renaming of SmartIndent). Maybe you can provide an updated version? Sorry - I didn't have that in mind.

dmoore:
Ok, I'm leaving this one to you guys. (Let me know if you want me to look at anything specific.)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version