diff options
author | Daniel Carl <danielcarl@gmx.de> | 2017-05-07 01:30:16 +0200 |
---|---|---|
committer | Daniel Carl <danielcarl@gmx.de> | 2017-05-07 01:32:15 +0200 |
commit | cb3af64b6cc851537f32615f3a1f8cb734605fcf (patch) | |
tree | 8859f8973bbeb0a8a60205f52d1e256cc1d2c095 | |
parent | 4705fb296c8cb2e41f1a02d639dab8ab89aff43c (diff) |
Fixed missed quotes around filter value #349.
-rw-r--r-- | src/hints.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/hints.c b/src/hints.c index 8a5f921..b24b313 100644 --- a/src/hints.c +++ b/src/hints.c @@ -72,8 +72,8 @@ VbResult hints_keypress(Client *c, int key) } 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); @@ -142,10 +142,9 @@ void hints_create(Client *c, const char *input) 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) @@ -348,7 +347,6 @@ static void call_hints_function(Client *c, const char *func, const char* args) 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) |