Kaydet (Commit) bd4956b5 authored tarafından Jiří Techet's avatar Jiří Techet

Fix corrupted initial prompt

The initial prompt may get corrupted so it looks something like

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

instead of

techet@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.
üst 5cfc3f20
......@@ -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"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment