about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--xxxterm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/xxxterm.c b/xxxterm.c
index f303535..82955ae 100644
--- a/xxxterm.c
+++ b/xxxterm.c
@@ -245,6 +245,7 @@ struct tab {
 	GThread			*thread;
 #endif
 	/* hints */
+	int			script_init;
 	int			hints_on;
 	int			new_tab;
 
@@ -2411,6 +2412,12 @@ run_script(struct tab *t, char *s)
 	DNPRINTF(XT_D_JS, "run_script: tab %d %s\n",
 	    t->tab_id, s == (char *)JS_HINTING ? "JS_HINTING" : s);
 
+	/* a bit silly but it prevents some heartburn */
+	if (t->script_init == 0) {
+		t->script_init = 1;
+		run_script(t, JS_HINTING);
+	}
+
 	frame = webkit_web_view_get_main_frame(t->wv);
 	ctx = webkit_web_frame_get_global_context(frame);