[geany/geany-plugins] 2e52ba: Merge pull request #863 from LarsGit223/issue574

Frank Lanitz git-noreply at xxxxx
Fri May 17 12:54:41 UTC 2019


Branch:      refs/heads/master
Author:      Frank Lanitz <frank at frank.uvena.de>
Committer:   GitHub <noreply at github.com>
Date:        Fri, 17 May 2019 12:54:41 UTC
Commit:      2e52ba0daa8cfefce8eae93c96164ea11765c526
             https://github.com/geany/geany-plugins/commit/2e52ba0daa8cfefce8eae93c96164ea11765c526

Log Message:
-----------
Merge pull request #863 from LarsGit223/issue574

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