Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Brace matching in the editors?

(1/2) > >>

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).


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]

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


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.


--- Quote ---I'll search on the web for it. Thanks.
--- End quote ---

 :?:  :?:  :?:  :?:
Search what? It's in the function I told you...


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: )


[0] Message Index

[#] Next page

Go to full version