1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-09 19:23:13 +02:00

api: add function completion_set

This commit is contained in:
Sébastien Helleu
2025-02-15 23:22:44 +01:00
parent 1b54cd24ed
commit c7d21a3ea6
25 changed files with 577 additions and 16 deletions
+17
View File
@@ -1561,6 +1561,23 @@ gui_completion_get_string (struct t_gui_completion *completion,
return NULL;
}
/*
* Sets a completion property.
*/
void
gui_completion_set (struct t_gui_completion *completion,
const char *property, const char *value)
{
if (!completion || !property || !value)
return;
if (strcmp (property, "add_space") == 0)
{
completion->add_space = (strcmp (value, "1") == 0) ? 1 : 0;
}
}
/*
* Returns hdata for completion.
*/
+2
View File
@@ -94,6 +94,8 @@ extern int gui_completion_search (struct t_gui_completion *completion,
int direction);
extern const char *gui_completion_get_string (struct t_gui_completion *completion,
const char *property);
extern void gui_completion_set (struct t_gui_completion *completion,
const char *property, const char *value);
extern struct t_hdata *gui_completion_hdata_completion_cb (const void *pointer,
void *data,
const char *hdata_name);