diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-06-18 16:47:09 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-06-18 16:47:09 +0200 |
commit | 66e8d703bd12c3c5da29c091d14485e260f6ab31 (patch) | |
tree | 0b2fa44b1da0c0d5c105c3426c0900ef3d2a4363 /src/core/wee-list.c | |
parent | 47c9c68b40dfaaf0f61f0d3ee1d37db1934f241a (diff) | |
download | weechat-66e8d703bd12c3c5da29c091d14485e260f6ab31.zip |
Add new options for completion, optional stop instead of cycling with words found
Diffstat (limited to 'src/core/wee-list.c')
-rw-r--r-- | src/core/wee-list.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/core/wee-list.c b/src/core/wee-list.c index 7d1c80c36..a261cdbbc 100644 --- a/src/core/wee-list.c +++ b/src/core/wee-list.c @@ -157,6 +157,28 @@ weelist_add (struct t_weelist *weelist, const char *data, const char *where) } /* + * weelist_dup: duplicate a weelist + */ + +struct t_weelist * +weelist_dup (struct t_weelist *weelist) +{ + struct t_weelist *new_weelist; + struct t_weelist_item *ptr_item; + + new_weelist = weelist_new (); + if (new_weelist) + { + for (ptr_item = weelist->items; ptr_item; + ptr_item = ptr_item->next_item) + { + weelist_add (new_weelist, ptr_item->data, WEECHAT_LIST_POS_END); + } + } + return new_weelist; +} + +/* * weelist_search: search data in a list (case sensitive) */ |