1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-04 08:43:13 +02:00

relay/api: add input fields in GET /api/buffers

New fields returned:

- "input" (string): content of input
- "input_position" (integer): position in input (starts at 0)
- "input_multiline" (boolean): true if the buffer allows multiline input
This commit is contained in:
Sébastien Helleu
2024-05-05 23:07:42 +02:00
parent 211cd11c2a
commit 6526cc230a
2 changed files with 17 additions and 0 deletions
+3
View File
@@ -385,6 +385,9 @@ relay_api_msg_buffer_to_json (struct t_gui_buffer *buffer,
lines = lines_free;
MSG_ADD_STR_PTR("type", ptr_string);
MSG_ADD_HDATA_STR_COLORS("title", "title");
MSG_ADD_HDATA_STR("input", "input_buffer");
MSG_ADD_HDATA_VAR(Number, "input_position", integer, "input_buffer_pos");
MSG_ADD_HDATA_VAR(Bool, "input_multiline", integer, "input_multiline");
MSG_ADD_HDATA_VAR(Bool, "nicklist", integer, "nicklist");
MSG_ADD_HDATA_VAR(Bool, "nicklist_case_sensitive", integer, "nicklist_case_sensitive");
MSG_ADD_HDATA_VAR(Bool, "nicklist_display_groups", integer, "nicklist_display_groups");