Branch: refs/heads/master
Author: Colomban Wendling <ban(a)herbesfolles.org>
Committer: Colomban Wendling <ban(a)herbesfolles.org>
Date: Mon, 09 Mar 2015 16:06:34 UTC
Commit: 085c83309ebf5c3a368b021b7f52d9af5a5e5fec
https://github.com/geany/geany-plugins/commit/085c83309ebf5c3a368b021b7f52d…
Log Message:
-----------
pairtaghighlighter: Fix clearing previous indicators
The second argument for SCI_INDICATORCLEARRANGE is the length to clear,
not the end position.
This used to work on earlier versions of Scintilla for some reason,
probably because it didn't check length, but current versions do nothing
with an invalid length.
Modified Paths:
--------------
pairtaghighlighter/src/pair_tag_highlighter.c
Modified: pairtaghighlighter/src/pair_tag_highlighter.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -150,7 +150,7 @@ static void highlight_matching_pair(ScintillaObject *sci)
static void clear_previous_highlighting(ScintillaObject *sci, gint rangeStart, gint rangeEnd)
{
scintilla_send_message(sci, SCI_SETINDICATORCURRENT, INDICATOR_TAGMATCH, 0);
- scintilla_send_message(sci, SCI_INDICATORCLEARRANGE, rangeStart, rangeEnd+1);
+ scintilla_send_message(sci, SCI_INDICATORCLEARRANGE, rangeStart, rangeEnd-rangeStart+1);
}
--------------
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: Thu, 05 Mar 2015 21:51:40 UTC
Commit: c92f785f13d9c74b482dffa43d5d7ccfb3efcd1c
https://github.com/geany/geany-plugins/commit/c92f785f13d9c74b482dffa43d5d7…
Log Message:
-----------
git-changebar: Fix repository monitoring after closing a file
The monitoring callbacks used to only push an update to the very
document for which the monitoring was initially setup. However, as
monitoring is not reset when switching to another file in the same
repository, it was easy to nullify the monitoring by opening two files
from the same repository and closing the first one, as then the
monitoring callbacks couldn't push the update to the closed document.
So, fix the monitoring callbacks to push an update to the current
document at the moment they are fired. This is not a problem because
the monitoring is properly reset when switching between different
repositories' files, and the update doesn't enforce a repository
anyway.
Modified Paths:
--------------
git-changebar/src/gcb-plugin.c
Modified: git-changebar/src/gcb-plugin.c
47 lines changed, 13 insertions(+), 34 deletions(-)
===================================================================
@@ -112,16 +112,11 @@ struct GotoNextHunkData {
};
-static void on_git_head_changed (GFileMonitor *monitor,
+static void on_git_repo_changed (GFileMonitor *monitor,
GFile *file,
GFile *other_file,
GFileMonitorEvent event_type,
- gpointer user_data);
-static void on_git_ref_changed (GFileMonitor *monitor,
- GFile *file,
- GFile *other_file,
- GFileMonitorEvent event_type,
- gpointer user_data);
+ gpointer force);
static gboolean on_sci_query_tooltip (GtkWidget *widget,
gint x,
gint y,
@@ -327,11 +322,11 @@ worker_thread (gpointer data)
/* we need to monitor HEAD, in case of e.g. branch switch (e.g.
* git checkout -b will switch the ref we need to watch) */
monitors[0] = monitor_repo_file (repo, "HEAD",
- G_CALLBACK (on_git_head_changed),
- job->user_data);
+ G_CALLBACK (on_git_repo_changed),
+ GINT_TO_POINTER (TRUE));
/* and of course the real ref (branch) for when changes get committed */
- monitors[1] = monitor_head_ref (repo, G_CALLBACK (on_git_ref_changed),
- job->user_data);
+ monitors[1] = monitor_head_ref (repo, G_CALLBACK (on_git_repo_changed),
+ GINT_TO_POINTER (FALSE));
}
}
@@ -359,7 +354,6 @@ worker_thread (gpointer data)
return NULL;
}
-/* @user_data will also be used to the file monitor callback */
static void
get_cached_blob_async (const gchar *path,
gboolean force,
@@ -872,32 +866,17 @@ on_startup_complete (GObject *obj,
}
static void
-on_git_head_changed (GFileMonitor *monitor,
- GFile *file,
- GFile *other_file,
- GFileMonitorEvent event_type,
- gpointer user_data)
+on_git_repo_changed (GFileMonitor *monitor,
+ GFile *file,
+ GFile *other_file,
+ GFileMonitorEvent event_type,
+ gpointer force)
{
- GeanyDocument *doc = document_find_by_id (GPOINTER_TO_UINT (user_data));
-
- if (doc) {
- clear_cached_blob ();
- update_diff_push (doc, TRUE);
- }
-}
-
-static void
-on_git_ref_changed (GFileMonitor *monitor,
- GFile *file,
- GFile *other_file,
- GFileMonitorEvent event_type,
- gpointer user_data)
-{
- GeanyDocument *doc = document_find_by_id (GPOINTER_TO_UINT (user_data));
+ GeanyDocument *doc = document_get_current ();
if (doc) {
clear_cached_blob ();
- update_diff_push (doc, FALSE);
+ update_diff_push (doc, GPOINTER_TO_INT (force));
}
}
--------------
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: Thu, 05 Mar 2015 01:17:07 UTC
Commit: 007c9d3284c2d2510cfb8507f2a4ed8970dcb7e1
https://github.com/geany/geany-plugins/commit/007c9d3284c2d2510cfb8507f2a4e…
Log Message:
-----------
geanylua: Fix possible NULL pointer dereference
`word_char` was only conditionally set to a non-NULL value, but
unconditionally dereferenced through a `strchr()` call.
While it seems highly unlikely to actually happen, play it safe and
set the fallback value by default.
Found by cppcheck.
Modified Paths:
--------------
geanylua/glspi_sci.c
Modified: geanylua/glspi_sci.c
3 lines changed, 1 insertions(+), 2 deletions(-)
===================================================================
@@ -229,7 +229,7 @@ static gint glspi_batch(lua_State* L)
/* Return the "word" at the given position */
static gint glspi_word(lua_State* L)
{
- const gchar* word_chars = NULL;
+ const gchar* word_chars = GEANY_WORDCHARS;
gint pos,linenum, bol, bow, eow;
gchar *text=NULL;
DOC_REQUIRED
@@ -251,7 +251,6 @@ static gint glspi_word(lua_State* L)
if (lua_isstring(L, -1)) {
word_chars=lua_tostring(L, -1);
} else {
- word_chars=GEANY_WORDCHARS;
lua_getglobal(L, LUA_MODULE_NAME);
lua_pushstring(L,tokenWordChars);
lua_pushstring(L,word_chars);
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Dimitar Zhekov <dimitar.zhekov(a)gmail.com>
Committer: Dimitar Zhekov <dimitar.zhekov(a)gmail.com>
Date: Tue, 03 Mar 2015 15:43:39 UTC
Commit: 3adef41d6ced6ce60a621a0cda94d3d79d7f8d3d
https://github.com/geany/geany-plugins/commit/3adef41d6ced6ce60a621a0cda94d…
Log Message:
-----------
scope: added waf check for openpty in pty.h or util.h, required
for -lutil. Should be used debugger too, since it checks only for
openpty in pty.h, even though util.h is supported in the source.
Modified Paths:
--------------
scope/wscript_configure
Modified: scope/wscript_configure
10 lines changed, 10 insertions(+), 0 deletions(-)
===================================================================
@@ -27,3 +27,13 @@ if not target_is_win32(bld) :
package='vte',
uselib_store='VTE',
args='--cflags --libs')
+ try :
+ conf.check_cc(function_name='openpty',
+ header_name='pty.h',
+ lib='util',
+ uselib_store='UTIL')
+ except :
+ conf.check_cc(function_name='openpty',
+ header_name='util.h',
+ lib='util',
+ uselib_store='UTIL')
--------------
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: Tue, 03 Mar 2015 01:24:34 UTC
Commit: c074a30c25fefa5e20928d6a4fdf0b22561256b7
https://github.com/geany/geany-plugins/commit/c074a30c25fefa5e20928d6a4fdf0…
Log Message:
-----------
webhelper: Fix bookmark completion on GTK 2.24
Geany hides the GtkComboBoxText API on GTK 2.24 because it wants to
keep the very same ABI on all GTK2 builds. So, we have to do the same
otherwise we get mixed APIs which doesn't quite work.
While at it, remove the redundant API mappings.
Closes #193.
Modified Paths:
--------------
webhelper/src/gwh-browser.c
Modified: webhelper/src/gwh-browser.c
12 lines changed, 5 insertions(+), 7 deletions(-)
===================================================================
@@ -51,15 +51,13 @@
(GTK_WIDGET_MAPPED ((w)))
# endif /* defined (gtk_widget_get_mapped) */
#endif /* GTK_CHECK_VERSION (2, 20, 0) */
-#if ! GTK_CHECK_VERSION (2, 24, 0)
-# define GtkComboBoxText GtkComboBox
-# define GTK_COMBO_BOX_TEXT GTK_COMBO_BOX
-# define GTK_IS_COMBO_BOX_TEXT GTK_IS_COMBO_BOX
-# define gtk_combo_box_text_new_with_entry gtk_combo_box_entry_new_text
+#if ! GTK_CHECK_VERSION (3, 0, 0)
+/* the GtkComboBoxText API is actually available in 2.24, but Geany's
+ * gtkcompat.h hides it on < 3.0.0 to keep ABI compatibility on all 2.x, so we
+ * need to use the old API there too. */
# define gtk_combo_box_get_entry_text_column(c) \
(gtk_combo_box_entry_get_text_column (GTK_COMBO_BOX_ENTRY (c)))
-# define gtk_combo_box_text_append_text gtk_combo_box_append_text
-#endif /* GTK_CHECK_VERSION (2, 24, 0) */
+#endif /* GTK_CHECK_VERSION (3, 0, 0) */
#if ! GTK_CHECK_VERSION (3, 0, 0)
static void
combo_box_text_remove_all (GtkComboBoxText *combo_box)
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).