<div dir="ltr">hi everyone.<div>my name is avi and i am a BSc CS student nearing the end of my first year of university. i really like geany and am interested in contributing to the project. i have an average knowledge in C and basic knowledge in C++, but have some experience working in collaboration with other devs on an existing code base. i'm also pretty good at figuring things out as i go along, so hopefully i'll be able to be of use without making too much of a mess :P.</div>

<div><br></div><div>there are a couple of things i would like to add to geany:</div><div>1) brace balancing - the current behavior is to auto-close a brace with no neighboring closing brace ("{" becomes "{}", but "{{}" remains "{{}" and not "{{}}"). i looked through the code that handles brace auto-closing, and noticed that braces aren't closed blindly, unlike quotes. i assume this difference is either because scintilla doesn't offer quote balancing (i didn't look though) or to try to prevent the code from being littered by accidental braces. i like the use of brace-matching, so i'm not suggesting to make braces close blindly, but am looking into adding a brace-balance calculation function.</div>

<div>2) an optional closing-character-overwrite (with toggleable preference) - i like the brace\quotes autocomplete features, but will sometimes close braces\quotes myself (so i type both "{" and "}") and would like the option to have geany overwrite the auto-closed brace (so if i type "{}" the result will be "{}" and not "{}}" like it is now) and the same for quotes (so " ' ' " doesn't become " ' ' ' ' "). this preference would use brace-balancing to decide when to overwrite a closing character (so when adding a "}" to "{{@}" where the @ is, no overwrite would occur, and the result would be "{{}}").</div>

<div><br></div><div>i am having trouble deciding how to implement the brace-balancing:</div><div>on the one hand, the code for this would be very similar to the scintilla method Document::BraceMatch(), with the difference of returning a value indicating the balance (for example, 1 if opening braces > closing braces, 0 if even, -1 if opening < closing) instead of the index of the matching brace. so it would seem natural to write the function in scintilla, but that would require adding an api to the method and adding a scintilla wrapper for it in geany, which seems like overkill for a function that has only 1 use case (that i can think of. when else would i want to know if braces are balanced, other than when trying to balance them...?).</div>

<div>on the other hand, by looking over the scintillaWrappers file in geany, i think it would be messy to implement the same thing directly in geany instead of in scintilla.</div><div><br></div><div>are these features that you would like added to geany (cause if not, i would just make a messy fix for myself and be done with it :P)?</div>

<div>if so, any suggestions regarding my dilema?</div><div><br></div><div>cheers,</div><div>avi.</div></div>