When reloading files, use the previously set encoding instead of detecting it again (closes #2862041).

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4223 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2009-09-21 20:48:50 +00:00
parent f8b18257ee
commit ae11cb9b1a
3 changed files with 6 additions and 1 deletions

View File

@ -2,6 +2,9 @@
* src/build.c:
Fix compiler warnings about uninitialised variables.
* src/callbacks.c, src/document.c:
When reloading files, use the previously set encoding instead of
detecting it again (closes #2862041).
2009-09-21 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>

View File

@ -464,6 +464,8 @@ on_reload_as_activate (GtkMenuItem *menuitem,
return;
charset = encodings[i].charset;
}
else
charset = doc->encoding;
base_name = g_path_get_basename(doc->file_name);
if (dialogs_show_question_full(NULL, _("_Reload"), GTK_STOCK_CANCEL,

View File

@ -2913,7 +2913,7 @@ static gboolean monitor_reload_file(GeanyDocument *doc)
base_name);
if (want_reload)
document_reload_file(doc, NULL);
document_reload_file(doc, doc->encoding);
g_free(base_name);
return want_reload;