mirror of
https://github.com/weechat/weechat.git
synced 2026-06-30 06:46:38 +02:00
api: add function line_search_by_id
This commit is contained in:
@@ -3990,6 +3990,23 @@ API_FUNC(buffer_match_list)
|
||||
API_RETURN_INT(value);
|
||||
}
|
||||
|
||||
API_FUNC(line_search_by_id)
|
||||
{
|
||||
char *buffer;
|
||||
int id;
|
||||
const char *result;
|
||||
|
||||
API_INIT_FUNC(1, "line_search_by_id", API_RETURN_EMPTY);
|
||||
buffer = NULL;
|
||||
id = 0;
|
||||
if (!PyArg_ParseTuple (args, "si", &buffer, &id))
|
||||
API_WRONG_ARGS(API_RETURN_EMPTY);
|
||||
|
||||
result = API_PTR2STR(weechat_line_search_by_id (API_STR2PTR(buffer), id));
|
||||
|
||||
API_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
API_FUNC(current_window)
|
||||
{
|
||||
const char *result;
|
||||
@@ -5745,6 +5762,7 @@ PyMethodDef weechat_python_funcs[] =
|
||||
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),
|
||||
|
||||
Reference in New Issue
Block a user