[geany/geany] dcfbf2: Don't allocate initial size based on autocompletion_max_entries

Nick Treleaven git-noreply at xxxxx
Thu Sep 19 12:56:46 UTC 2013


Branch:      refs/heads/master
Author:      Nick Treleaven <nick.treleaven at btinternet.com>
Committer:   Nick Treleaven <nick.treleaven at btinternet.com>
Date:        Thu, 19 Sep 2013 12:56:46 UTC
Commit:      dcfbf22cf291b48ad511135c612ca57c8d3e99da
             https://github.com/geany/geany/commit/dcfbf22cf291b48ad511135c612ca57c8d3e99da

Log Message:
-----------
Don't allocate initial size based on autocompletion_max_entries

The user may have set that too high.


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

Modified: src/editor.c
2 files changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -2155,7 +2155,7 @@ static gboolean autocomplete_doc_word(GeanyEditor *editor, gchar *root, gsize ro
 		return FALSE;
 	}
 
-	str = g_string_sized_new(editor_prefs.autocompletion_max_entries * (rootlen + 1));
+	str = g_string_sized_new(rootlen * 2 * 10);
 	foreach_slist(node, words)
 	{
 		g_string_append(str, node->data);



--------------
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