On Mon, 15 Dec 2008 13:12:54 +0000, Nick Treleaven nick.treleaven@btinternet.com wrote:
On Tue, 9 Dec 2008 05:14:08 +0100 (CET) ioguix@free.fr wrote:
In a first step, when opening a brace (ie. ( { [ ), we could check if no closing brace already match it before auto-closing it. That what I tried to do in the attached patch.
I actually worked on the patch yesterday but had some weird connectivity issues (some sites weren't reachable including sourceforge.net, so no commits).
@ioguix: The second of your patch was about to change handling of GEANY_AC_SQUOTE with end_pos which was IMO a typo and should have been in the GEANY_AC_SBRACKET, so I moved it there. Correct me if I'm wrong.
- can we really test if we are actually in a in string whatever the
current language style ?
Yes, but maybe not all filetypes are completely supported. See is_string_style() in editor.c.
Though this function treats all kinds of strings equally, that is for languages like C or Python where you have different kind of strings ('blah', "blah", ''' blag ''', ...) this function returns TRUE for all kinds. But you probably want something more fine-grained to differentiate between 'blah' and "blah".
Regards, Enrico