From 660c441b4af272fe4e40eb6a6cda2badb8f17eac Mon Sep 17 00:00:00 2001 From: Arthur Rosenstein Date: Wed, 6 Nov 2013 16:28:09 +0000 Subject: [PATCH] Don't prompt for reload confirmation if keeping edit history No work is lost in that case (except for the redo stack, which is normal), so the extra confirmation step seems bothersome. --- src/callbacks.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/callbacks.c b/src/callbacks.c index b09f822cb4..57d05f3f07 100644 --- a/src/callbacks.c +++ b/src/callbacks.c @@ -428,8 +428,9 @@ G_MODULE_EXPORT void on_reload_as_activate(GtkMenuItem *menuitem, gpointer user_ charset = doc->encoding; base_name = g_path_get_basename(doc->file_name); - /* don't prompt if file hasn't been edited at all */ - if ((!doc->changed && !document_can_undo(doc) && !document_can_redo(doc)) || + /* don't prompt if edit history is maintained, or if file hasn't been edited at all. */ + if (file_prefs.keep_edit_history_on_reload || + (!doc->changed && !document_can_undo(doc) && !document_can_redo(doc)) || dialogs_show_question_full(NULL, _("_Reload"), GTK_STOCK_CANCEL, _("Any unsaved changes will be lost."), _("Are you sure you want to reload '%s'?"), base_name))