[geany/geany] bd4956: Fix corrupted initial prompt

Jiří Techet git-noreply at xxxxx
Sun May 17 16:22:32 UTC 2015


Branch:      refs/heads/master
Author:      Jiří Techet <techet at gmail.com>
Committer:   Jiří Techet <techet at gmail.com>
Date:        Sun, 17 May 2015 16:22:32 UTC
Commit:      bd4956b555dfccb7546796866261d7946450536d
             https://github.com/geany/geany/commit/bd4956b555dfccb7546796866261d7946450536d

Log Message:
-----------
Fix corrupted initial prompt

The initial prompt may get corrupted so it looks something like

any/src $ het-vm ~/projects/gea

instead of

techet at techet-vm ~/projects/geany/src $

This is just the initial display problem - when enter is pressed, the
second line already shows correct prompt.

It appears that VTE isn't fully initialized when starting the shell process
and when the shell start is delayed a bit (performed on idle), the prompt
looks correct.


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

Modified: src/vte.c
10 lines changed, 9 insertions(+), 1 deletions(-)
===================================================================
@@ -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