[geany/geany-plugins] d079ef: automark: move initialization behind DOC_VALID check. Fixes #574.
LarsGit223
git-noreply at xxxxx
Thu May 16 17:55:20 UTC 2019
Branch: refs/heads/master
Author: LarsGit223 <lars_paulsen at web.de>
Committer: LarsGit223 <lars_paulsen at web.de>
Date: Thu, 16 May 2019 17:55:20 UTC
Commit: d079efa87f3e9ab672a3d7d6ea740f3da2e3a2b5
https://github.com/geany/geany-plugins/commit/d079efa87f3e9ab672a3d7d6ea740f3da2e3a2b5
Log Message:
-----------
automark: move initialization behind DOC_VALID check. Fixes #574.
Modified Paths:
--------------
automark/src/automark.c
Modified: automark/src/automark.c
7 lines changed, 5 insertions(+), 2 deletions(-)
===================================================================
@@ -91,9 +91,9 @@ static gboolean
automark(gpointer user_data)
{
GeanyDocument *doc = (GeanyDocument *)user_data;
- GeanyEditor *editor = doc->editor;
+ GeanyEditor *editor;
static GeanyEditor *editor_cache = NULL;
- ScintillaObject *sci = editor->sci;
+ ScintillaObject *sci;
gchar *text;
static gchar text_cache[GEANY_MAX_WORD_LENGTH] = {0};
gint match_flag = SCFIND_MATCHCASE | SCFIND_WHOLEWORD;
@@ -105,6 +105,9 @@ automark(gpointer user_data)
if (!DOC_VALID(doc))
return FALSE;
+ editor = doc->editor;
+ sci = editor->sci;
+
/* Do not highlight while selecting text and allow other markers to work */
if (sci_has_selection(sci))
return FALSE;
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Plugins-Commits
mailing list