[geany/geany] 938da9: Merge pull request #1326 from b4n/default-open-enc

Colomban Wendling git-noreply at xxxxx
Sun Apr 14 13:53:13 UTC 2019


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Sun, 14 Apr 2019 13:53:13 UTC
Commit:      938da95c9def39377380e7a15c88eb6bb712d7cc
             https://github.com/geany/geany/commit/938da95c9def39377380e7a15c88eb6bb712d7cc

Log Message:
-----------
Merge pull request #1326 from b4n/default-open-enc

Fix loading the default open encoding option


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

Modified: src/keyfile.c
4 lines changed, 3 insertions(+), 1 deletions(-)
===================================================================
@@ -831,7 +831,9 @@ static void load_dialog_prefs(GKeyFile *config)
 		"none");
 	if (tmp_string)
 	{
-		const GeanyEncoding *enc = encodings_get_from_charset(tmp_string);
+		const GeanyEncoding *enc = NULL;
+		if (strcmp(tmp_string, "none") != 0)
+			enc = encodings_get_from_charset(tmp_string);
 		if (enc != NULL)
 			file_prefs.default_open_encoding = enc->idx;
 		else



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