[evolution/gnome-3-18] EHTMLEditorView - Correctly remove the HISTORY_AND events from history
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-18] EHTMLEditorView - Correctly remove the HISTORY_AND events from history
- Date: Fri, 20 Nov 2015 13:53:53 +0000 (UTC)
commit 9ac288ce27f4135bd0a974d7a7e428978bc2e4aa
Author: Tomas Popela <tpopela redhat com>
Date: Fri Nov 20 14:30:06 2015 +0100
EHTMLEditorView - Correctly remove the HISTORY_AND events from history
e-util/e-html-editor-view.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index 313fa96..70662b9 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -12288,8 +12288,14 @@ e_html_editor_view_insert_new_history_event (EHTMLEditorView *view,
remove_forward_redo_history_events_if_needed (view);
- if (view->priv->history_size >= HISTORY_SIZE_LIMIT)
+ if (view->priv->history_size >= HISTORY_SIZE_LIMIT) {
remove_history_event (view, g_list_last (view->priv->history)->prev);
+ while (((EHTMLEditorViewHistoryEvent *) (g_list_last (view->priv->history)->prev))->type ==
HISTORY_AND) {
+ remove_history_event (view, g_list_last (view->priv->history)->prev);
+ remove_history_event (view, g_list_last (view->priv->history)->prev);
+ }
+
+ }
view->priv->history = g_list_prepend (view->priv->history, event);
view->priv->history_size++;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]