[evolution] EHTMLEditorView - Correctly remove the HISTORY_AND events from history
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] EHTMLEditorView - Correctly remove the HISTORY_AND events from history
- Date: Fri, 20 Nov 2015 13:41:10 +0000 (UTC)
commit bc82937ab4419d3c8153679c473a172e3bc7fbe3
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 a71b34a..966d881 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -12322,8 +12322,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]