} else {
fire_timeout(c, true);
/* try to handle the key by the javascript */
- call_hints_function(c, "update", (char[]){key, '\0'});
- return RESULT_COMPLETE;
+ call_hints_function(c, "update", (char[]){'"', key, '"', '\0'});
+ return RESULT_ERROR;
}
fire_timeout(c, false);
return;
}
- call_hints_function(
- c, "filter",
- *(input + hints.promptlen) ? input + hints.promptlen : ""
- );
+ jsargs = g_strdup_printf("'%s'", *(input + hints.promptlen) ? input + hints.promptlen : "");
+ call_hints_function(c, "filter", jsargs);
+ g_free(jsargs);
}
void hints_focus_next(Client *c, const gboolean back)
jscode = g_strdup_printf("hints.%s(%s);", func, args);
ext_proxy_eval_script(c, jscode, (GAsyncReadyCallback)hints_function_callback);
g_free(jscode);
-
}
static void fire_timeout(Client *c, gboolean on)