[gnome-builder] terminal: only warn if we were expected to respawn



commit d20164d2c5e26fe11095e15515493f43d3b479cd
Author: Christian Hergert <chergert redhat com>
Date:   Mon Aug 5 12:33:18 2019 -0700

    terminal: only warn if we were expected to respawn

 src/libide/terminal/ide-terminal-page.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/libide/terminal/ide-terminal-page.c b/src/libide/terminal/ide-terminal-page.c
index 18e7e457d..388826f09 100644
--- a/src/libide/terminal/ide-terminal-page.c
+++ b/src/libide/terminal/ide-terminal-page.c
@@ -109,14 +109,6 @@ ide_terminal_page_spawn_cb (GObject      *object,
   if (gtk_widget_in_destruction (GTK_WIDGET (self)))
     return;
 
-  now = g_get_monotonic_time ();
-
-  if (ABS (now - self->last_respawn) < FLAPPING_DURATION_USEC)
-    {
-      ide_terminal_page_feed (self, _("Subprocess launcher failed too quickly, will not respawn."));
-      return;
-    }
-
   if (!self->respawn_on_exit)
     {
       if (self->close_on_exit)
@@ -127,6 +119,14 @@ ide_terminal_page_spawn_cb (GObject      *object,
       return;
     }
 
+  now = g_get_monotonic_time ();
+
+  if (ABS (now - self->last_respawn) < FLAPPING_DURATION_USEC)
+    {
+      ide_terminal_page_feed (self, _("Subprocess launcher failed too quickly, will not respawn."));
+      return;
+    }
+
   g_clear_object (&self->pty);
   vte_terminal_reset (VTE_TERMINAL (self->terminal_top), TRUE, TRUE);
   self->pty = vte_pty_new_sync (VTE_PTY_DEFAULT, NULL, NULL);


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