News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Brace matching in the editors?

Started by rickg22, May 09, 2005, 07:35:01 PM

Previous topic - Next topic

rickg22

I stumbled upon a feature request, and I don't know how to handle it. It says that whenever you close a brace, the matching brace should be highlighted.

Currently this only happens if i move the cursor. For example:

something(){ blablah }  (here the matching brace is highlighted).

But:

something(){ blablah }_   (nothing happens)

Any idea on how to solve this riddle? Do we have to modify the scintilla source code, or derive the wxStyledTextEditor? Or it can't be done at all?

Anyone?  :?: [/u]

mandrav

OMG, Rick if you could just look at the code...
Hint: look at cbEditor::HighlightBraces()

Yiannis.
Be patient!
This bug will be fixed soon...

rickg22

Oops :oops: ok thanks... I think I'll have to study the full editor source code. :oops: :oops:

I'll search on the web for it. Thanks.

mandrav

QuoteI'll search on the web for it. Thanks.
:?:  :?:  :?:  :?:
Search what? It's in the function I told you...

Yiannis.
Be patient!
This bug will be fixed soon...

rickg22

Oh, fool me... i thought you were talking about StyledTextCtrl. Anyway I submitted the patch now. It's on SF (i'm at work). What confused me was that i couldn't find a HighlightBraces call anywhere.
(Note to self: Don't try to program CB at work :roll: - I guess that explains this odd behavior, huh? :oops: )

David Perfors

Quote from: rickg22Oh, fool me... i thought you were talking about StyledTextCtrl. Anyway I submitted the patch now. It's on SF (i'm at work). What confused me was that i couldn't find a HighlightBraces call anywhere.
(Note to self: Don't try to program CB at work :roll: - I guess that explains this odd behavior, huh? :oops: )
This also could happen when you are home ;)  so don't worry  :lol:
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

rickg22

In any case i submitted the patch. :) Thanks for the support!