[Github-comments] [geany/geany] Improve auto close (#2943)
Thomas Martitz
notifications at xxxxx
Sun Oct 17 11:44:52 UTC 2021
@kugel- commented on this pull request.
>
static void auto_close_chars(ScintillaObject *sci, gint pos, gchar c)
{
const gchar *closing_char = NULL;
- gint end_pos = -1;
-
- if (utils_isbrace(c, 0))
- end_pos = sci_find_matching_brace(sci, pos - 1);
Right, but this makes autoclose also next to useless (I have it disabled and would welcome improvements). Since autoclosing now only works if Scintilla doesn't see a matching brace autoclosing does not work most of the time. E.g.:
```
int foo()
{
if (x) { // !! no autoclose for {, as Scintilla matches the } at the end of the function
}
```
`()` is autoclosed in that example, though. So basically as of now autoclosing works reliably only at the end of documents, otherwise it may seem to work only randomly.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/2943#discussion_r730401635
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20211017/b1616810/attachment.htm>
More information about the Github-comments
mailing list