summaryrefslogtreecommitdiff
path: root/src/plugins/javascript
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2020-04-28 10:46:49 +0200
committerSébastien Helleu <flashcode@flashtux.org>2020-04-28 10:46:49 +0200
commitd1a427b67fc57c1868f6ebddd458cfa5252aa848 (patch)
tree03dece50d9f1683ff8869a2e1f078e6d2da0bbf1 /src/plugins/javascript
parent2bd8e91b54625a8758d7ed6e272db7c291cafb3b (diff)
downloadweechat-d1a427b67fc57c1868f6ebddd458cfa5252aa848.zip
api: return integer in function gui_completion_search (issue #1484)
Diffstat (limited to 'src/plugins/javascript')
-rw-r--r--src/plugins/javascript/weechat-js-api.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/javascript/weechat-js-api.cpp b/src/plugins/javascript/weechat-js-api.cpp
index 8935a17e7..275c38592 100644
--- a/src/plugins/javascript/weechat-js-api.cpp
+++ b/src/plugins/javascript/weechat-js-api.cpp
@@ -4015,22 +4015,22 @@ API_FUNC(completion_new)
API_FUNC(completion_search)
{
- int position, direction;
+ int position, direction, rc;
- API_INIT_FUNC(1, "completion_search", "ssii", API_RETURN_ERROR);
+ API_INIT_FUNC(1, "completion_search", "ssii", API_RETURN_INT(0));
v8::String::Utf8Value completion(args[0]);
v8::String::Utf8Value data(args[1]);
position = args[2]->IntegerValue();
direction = args[3]->IntegerValue();
- weechat_completion_search (
+ rc = weechat_completion_search (
(struct t_gui_completion *)API_STR2PTR(*completion),
(const char *)(*data),
position,
direction);
- API_RETURN_OK;
+ API_RETURN_INT(rc);
}
API_FUNC(completion_free)