1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-24 20:06:38 +02:00

api: add function line_search_by_id

This commit is contained in:
Sébastien Helleu
2024-06-27 07:03:55 +02:00
parent 0e9ed21edf
commit f076db4767
26 changed files with 448 additions and 3 deletions
+17
View File
@@ -3808,6 +3808,22 @@ API_FUNC(buffer_match_list)
API_RETURN_INT(value);
}
API_FUNC(line_search_by_id)
{
const char *result;
int id;
API_INIT_FUNC(1, "line_search_by_id", "si", API_RETURN_EMPTY);
v8::String::Utf8Value buffer(args[0]);
id = args[1]->IntegerValue();
result = API_PTR2STR(
weechat_line_search_by_id ((struct t_gui_buffer *)API_STR2PTR(*buffer), id));
API_RETURN_STRING(result);
}
API_FUNC(current_window)
{
const char *result;
@@ -5487,6 +5503,7 @@ WeechatJsV8::loadLibs()
API_DEF_FUNC(buffer_set);
API_DEF_FUNC(buffer_string_replace_local_var);
API_DEF_FUNC(buffer_match_list);
API_DEF_FUNC(line_search_by_id);
API_DEF_FUNC(current_window);
API_DEF_FUNC(window_search_with_buffer);
API_DEF_FUNC(window_get_integer);