[geany/geany] de8470: Merge pull request #499 from techee/vte_prompt

Colomban Wendling git-noreply at xxxxx
Tue May 26 20:37:34 UTC 2015


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Tue, 26 May 2015 20:37:34 UTC
Commit:      de8470dc5661474739ebe8f6ef8100ac6377723a
             https://github.com/geany/geany/commit/de8470dc5661474739ebe8f6ef8100ac6377723a

Log Message:
-----------
Merge pull request #499 from techee/vte_prompt

VTE prompt fixes


Modified Paths:
--------------
    src/vte.c

Modified: src/vte.c
12 lines changed, 10 insertions(+), 2 deletions(-)
===================================================================
@@ -163,7 +163,7 @@ static const GtkTargetEntry dnd_targets[] =
 
 static gchar **vte_get_child_environment(void)
 {
-	const gchar *exclude_vars[] = {"COLUMNS", "LINES", "TERM", NULL};
+	const gchar *exclude_vars[] = {"COLUMNS", "LINES", "TERM", "TERM_PROGRAM", NULL};
 
 	return utils_copy_environment(exclude_vars, "TERM", "xterm", NULL);
 }
@@ -259,6 +259,13 @@ static void on_vte_realize(void)
 }
 
 
+static gboolean vte_start_idle(G_GNUC_UNUSED gpointer user_data)
+{
+	vte_start(vc->vte);
+	return FALSE;
+}
+
+
 static void create_vte(void)
 {
 	GtkWidget *vte, *scrollbar, *hbox;
@@ -294,7 +301,8 @@ static void create_vte(void)
 	g_signal_connect(vte, "motion-notify-event", G_CALLBACK(on_motion_event), NULL);
 	g_signal_connect(vte, "drag-data-received", G_CALLBACK(vte_drag_data_received), NULL);
 
-	vte_start(vte);
+	/* start shell on idle otherwise the initial prompt can get corrupted */
+	g_idle_add(vte_start_idle, NULL);
 
 	gtk_widget_show_all(hbox);
 	terminal_label = gtk_label_new(_("Terminal"));



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list