Branch: refs/heads/master
Author: Colomban Wendling <ban(a)herbesfolles.org>
Committer: Colomban Wendling <ban(a)herbesfolles.org>
Date: Sun, 13 Apr 2014 00:09:13 UTC
Commit: afcb2a137c8d20a26d69166ed6a4326990c3526c
https://github.com/geany/geany-plugins/commit/afcb2a137c8d20a26d69166ed6a43…
Log Message:
-----------
debugger: Disconnect signals on the Scintilla widget more cautiously
No signal handler on a Scintilla widget should ever be left on a plugin
unload, otherwise unloaded code from the callback could get called.
So, although the code was probably good enough in most normal
situations, be a little more cautious about removing existing handlers
in any cases.
Modified Paths:
--------------
debugger/src/callbacks.c
Modified: debugger/src/callbacks.c
15 files changed, 12 insertions(+), 3 deletions(-)
===================================================================
@@ -157,13 +157,17 @@ void on_document_open(GObject *obj, GeanyDocument *doc, gpointer user_data)
/*
* Handles mouse leave event to check if a calltip is still present and hides it if yes
*/
-static gint leave_signal;
+static gulong leave_signal = 0;
static gboolean on_mouse_leave(GtkWidget *widget, GdkEvent *event, gpointer user_data)
{
ScintillaObject *so = (ScintillaObject*)widget;
- if (scintilla_send_message (so, SCI_CALLTIPACTIVE, 0, 0))
+ if (leave_signal > 0)
{
g_signal_handler_disconnect(G_OBJECT(widget), leave_signal);
+ leave_signal = 0;
+ }
+ if (scintilla_send_message (so, SCI_CALLTIPACTIVE, 0, 0))
+ {
scintilla_send_message (so, SCI_CALLTIPCANCEL, 0, 0);
}
return FALSE;
@@ -234,12 +238,17 @@ gboolean on_editor_notify(
}
case SCN_DWELLEND:
{
+ if (leave_signal > 0)
+ {
+ g_signal_handler_disconnect(G_OBJECT(editor->sci), leave_signal);
+ leave_signal = 0;
+ }
+
if (DBS_STOPPED != debug_get_state ())
break;
if (scintilla_send_message (editor->sci, SCI_CALLTIPACTIVE, 0, 0))
{
- g_signal_handler_disconnect(G_OBJECT(editor->sci), leave_signal);
scintilla_send_message (editor->sci, SCI_CALLTIPCANCEL, 0, 0);
}
break;
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Matthew Brush <matt(a)geany.org>
Committer: Matthew Brush <matt(a)geany.org>
Date: Sat, 12 Apr 2014 19:15:00 UTC
Commit: cb41c21718fb5b78de077a1d8cf92bdbaed94b9e
https://github.com/geany/geany-plugins/commit/cb41c21718fb5b78de077a1d8cf92…
Log Message:
-----------
Add not about known crasher bug when reloading
Modified Paths:
--------------
geanypy/README
Modified: geanypy/README
7 files changed, 7 insertions(+), 0 deletions(-)
===================================================================
@@ -71,3 +71,10 @@ https://github.com/codebrainz/geanypy.
Upstream developed by Matthew Brush.
Geany-plugins version maintained by elextr(a)lists.geany.org
+
+Known Bugs
+----------
+
+* There is an issue with re-loading GeanyPy twice in the same session. If
+you unload the GeanyPy plugin you should restart Geany to avoid a potential
+crash.
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Colomban Wendling <ban(a)herbesfolles.org>
Committer: Colomban Wendling <ban(a)herbesfolles.org>
Date: Sat, 12 Apr 2014 17:59:35 UTC
Commit: 8af8d52b74f8530eb3b8bf478c8ca558f5bf2507
https://github.com/geany/geany-plugins/commit/8af8d52b74f8530eb3b8bf478c8ca…
Log Message:
-----------
geanylatex: Allow for multiple spaces after punctuation when capitalizing
Allow form multiple white spaces (including newlines) after a
punctuation when checking whether to capitalize the sentence start.
This is useful because some people are used to write two spaces between
sentences, and it also allows to capitalize the first sentence of a new
paragraph.
Modified Paths:
--------------
geanylatex/src/geanylatex.c
Modified: geanylatex/src/geanylatex.c
24 files changed, 18 insertions(+), 6 deletions(-)
===================================================================
@@ -700,12 +700,24 @@ static gboolean on_editor_notify(G_GNUC_UNUSED GObject *object, GeanyEditor *edi
}
default:
{
- if (glatex_capitalize_sentence_starts == TRUE)
+ if (glatex_capitalize_sentence_starts == TRUE &&
+ g_ascii_isspace(get_char_relative(sci, pos, -2)))
{
- if (get_char_relative(sci, pos, -2) == ' ' &&
- (get_char_relative(sci, pos, -3) == '.' ||
- get_char_relative(sci, pos, -3) == '!' ||
- get_char_relative(sci, pos, -3) == '?'))
+ gint prevNonWhite = 0;
+ gint i;
+
+ /* find the previous non-white character */
+ i = get_position_relative(sci, pos, -3);
+ while (g_ascii_isspace((prevNonWhite = sci_get_char_at(sci, i))))
+ {
+ /* no need to bother about multi-byte characters here since
+ * we only check for ASCII space characters anyway */
+ --i;
+ }
+
+ if (prevNonWhite == '.' ||
+ prevNonWhite == '!' ||
+ prevNonWhite == '?')
{
gchar *upperLtr = NULL;
gchar *selection = NULL;
@@ -720,8 +732,8 @@ static gboolean on_editor_notify(G_GNUC_UNUSED GObject *object, GeanyEditor *edi
g_free(upperLtr);
g_free(selection);
}
- break;
}
+ break;
}
} /* Closing switch */
/* later there could be some else ifs for other keywords */
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).