summaryrefslogtreecommitdiff
path: root/src/plugins/spell/spell-bar-item.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2019-03-10 13:16:59 +0100
committerSébastien Helleu <flashcode@flashtux.org>2019-03-10 18:29:16 +0100
commit2b70d71aa1c891f2f251aa775cf239e5611576d5 (patch)
tree33b7daaa910582482c420e4e1e06a2d8851572e9 /src/plugins/spell/spell-bar-item.c
parent8aa5f5375e2a16d538fdf96babcd52a2f8f7801c (diff)
downloadweechat-2b70d71aa1c891f2f251aa775cf239e5611576d5.zip
core: replace argument "keep_eol" by "flags" in function string_split (closes #1322)
Diffstat (limited to 'src/plugins/spell/spell-bar-item.c')
-rw-r--r--src/plugins/spell/spell-bar-item.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/plugins/spell/spell-bar-item.c b/src/plugins/spell/spell-bar-item.c
index 0b9ef5453..c6a1ae885 100644
--- a/src/plugins/spell/spell-bar-item.c
+++ b/src/plugins/spell/spell-bar-item.c
@@ -101,7 +101,11 @@ spell_bar_item_suggest (const void *pointer, void *data,
if (!str_suggest)
return NULL;
- suggestions = weechat_string_split (pos, "/", 0, 0, &num_suggestions);
+ suggestions = weechat_string_split (pos, "/",
+ WEECHAT_STRING_SPLIT_STRIP_LEFT
+ | WEECHAT_STRING_SPLIT_STRIP_RIGHT
+ | WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
+ 0, &num_suggestions);
if (!suggestions)
goto end;
@@ -119,8 +123,14 @@ spell_bar_item_suggest (const void *pointer, void *data,
weechat_config_string (
spell_config_look_suggestion_delimiter_dict));
}
- suggestions2 = weechat_string_split (suggestions[i], ",", 0, 0,
- &num_suggestions2);
+ suggestions2 = weechat_string_split (
+ suggestions[i],
+ ",",
+ WEECHAT_STRING_SPLIT_STRIP_LEFT
+ | WEECHAT_STRING_SPLIT_STRIP_RIGHT
+ | WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
+ 0,
+ &num_suggestions2);
if (suggestions2)
{
for (j = 0; j < num_suggestions2; j++)