[gnome-builder] only undo if we already coalesced



commit f60f87e2829b0c626226f947bbb18028652fd6d5
Author: Christian Hergert <christian hergert me>
Date:   Thu Mar 19 00:30:44 2015 -0700

    only undo if we already coalesced

 libide/ide-source-view.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/libide/ide-source-view.c b/libide/ide-source-view.c
index 93c517c..b4736af 100644
--- a/libide/ide-source-view.c
+++ b/libide/ide-source-view.c
@@ -3563,7 +3563,10 @@ ide_source_view_real_undo (GtkSourceView *source_view)
 {
   IdeSourceView *self = (IdeSourceView *)source_view;
   IdeSourceViewPrivate *priv = ide_source_view_get_instance_private (self);
-  gboolean needs_unlock = !!priv->mode;
+  gboolean needs_unlock = FALSE;
+
+  if (priv->mode && ide_source_view_mode_get_coalesce_undo (priv->mode))
+    needs_unlock = TRUE;
 
   if (needs_unlock)
     g_signal_emit_by_name (self, "end-user-action");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]