[geany/geany] b81c35: Fix const promotion with updated Scintilla

Colomban Wendling git-noreply at xxxxx
Mon Apr 14 14:34:19 UTC 2014


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Mon, 14 Apr 2014 14:34:19 UTC
Commit:      b81c35e4e3a6fd8fb780d67f2f4783ffe3761eaf
             https://github.com/geany/geany/commit/b81c35e4e3a6fd8fb780d67f2f4783ffe3761eaf

Log Message:
-----------
Fix const promotion with updated Scintilla


Modified Paths:
--------------
    src/editor.c

Modified: src/editor.c
6 files changed, 4 insertions(+), 2 deletions(-)
===================================================================
@@ -4349,6 +4349,7 @@ void editor_replace_spaces(GeanyEditor *editor)
 	gint search_pos;
 	static gdouble tab_len_f = -1.0; /* keep the last used value */
 	gint tab_len;
+	gchar *text;
 	struct Sci_TextToFind ttf;
 
 	g_return_if_fail(editor != NULL);
@@ -4364,11 +4365,12 @@ void editor_replace_spaces(GeanyEditor *editor)
 		return;
 	}
 	tab_len = (gint) tab_len_f;
+	text = g_strnfill(tab_len, ' ');
 
 	sci_start_undo_action(editor->sci);
 	ttf.chrg.cpMin = 0;
 	ttf.chrg.cpMax = sci_get_length(editor->sci);
-	ttf.lpstrText = g_strnfill(tab_len, ' ');
+	ttf.lpstrText = text;
 
 	while (TRUE)
 	{
@@ -4390,7 +4392,7 @@ void editor_replace_spaces(GeanyEditor *editor)
 		ttf.chrg.cpMax -= tab_len - 1;
 	}
 	sci_end_undo_action(editor->sci);
-	g_free(ttf.lpstrText);
+	g_free(text);
 }
 
 



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list