summaryrefslogtreecommitdiff
path: root/doc/it
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 /doc/it
parent2bd8e91b54625a8758d7ed6e272db7c291cafb3b (diff)
downloadweechat-d1a427b67fc57c1868f6ebddd458cfa5252aa848.zip
api: return integer in function gui_completion_search (issue #1484)
Diffstat (limited to 'doc/it')
-rw-r--r--doc/it/weechat_plugin_api.it.adoc19
1 files changed, 14 insertions, 5 deletions
diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc
index 6494b5c75..000e42ade 100644
--- a/doc/it/weechat_plugin_api.it.adoc
+++ b/doc/it/weechat_plugin_api.it.adoc
@@ -15593,8 +15593,8 @@ Prototipo:
[source,C]
----
-void weechat_completion_search (struct t_gui_completion *completion, const char *data,
- int position, int direction);
+int weechat_completion_search (struct t_gui_completion *completion, const char *data,
+ int position, int direction);
----
Argomenti:
@@ -15604,12 +15604,20 @@ Argomenti:
* _position_: index of the char in string to complete (starts to 0)
* _direction_: 1 for next completion, -1 for previous completion
+Valore restituito:
+
+// TRANSLATION MISSING
+* 1 if OK, 0 if error
+
Esempio in C:
[source,C]
----
struct t_gui_completion *completion = weechat_completion_new (weechat_buffer_search_main ());
-weechat_completion_search (completion, "/help filt", 10, 1);
+if (weechat_completion_search (completion, "/help filt", 10, 1))
+{
+ /* ... */
+}
----
Script (Python):
@@ -15617,11 +15625,12 @@ Script (Python):
[source,python]
----
# prototipo
-weechat.completion_search(completion, data, position, direction)
+rc = weechat.completion_search(completion, data, position, direction)
# esempio
completion = weechat.completion_new(weechat.buffer_search_main())
-weechat.completion_search(completion, "/help filt", 10, 1);
+if weechat.completion_search(completion, "/help filt", 10, 1):
+ # ...
----
// TRANSLATION MISSING