diff --git a/src/document.h b/src/document.h index 0cc7d83c..4a04f1e5 100644 --- a/src/document.h +++ b/src/document.h @@ -66,6 +66,7 @@ typedef struct GeanyFilePrefs gboolean use_gio_unsafe_file_saving; /* whether to use GIO as the unsafe backend */ gchar *extract_filetype_regex; /* regex to extract filetype on opening */ gboolean tab_close_switch_to_mru; + gboolean keep_edit_history_on_reload; /* Keep undo stack upon, and allow undoing of, document reloading. */ } GeanyFilePrefs; diff --git a/src/keyfile.c b/src/keyfile.c index 8953401f..53042237 100644 --- a/src/keyfile.c +++ b/src/keyfile.c @@ -220,6 +220,8 @@ static void init_pref_groups(void) "gio_unsafe_save_backup", FALSE); stash_group_add_boolean(group, &file_prefs.use_gio_unsafe_file_saving, "use_gio_unsafe_file_saving", TRUE); + stash_group_add_boolean(group, &file_prefs.keep_edit_history_on_reload, + "keep_edit_history_on_reload", TRUE); /* for backwards-compatibility */ stash_group_add_integer(group, &editor_prefs.indentation->hard_tab_width, "indent_hard_tab_width", 8);