diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/plugins/aspell/weechat-aspell.c | 17 |
2 files changed, 15 insertions, 6 deletions
@@ -1,7 +1,7 @@ WeeChat ChangeLog ================= Sébastien Helleu <flashcode@flashtux.org> -v0.4.0-dev, 2012-11-02 +v0.4.0-dev, 2012-11-04 Version 0.4.0 (under dev!) @@ -23,6 +23,8 @@ Version 0.4.0 (under dev!) hook_connect, move "sock" from hook_connect arguments to callback of hook_connect (task #11205) * aspell: add bar item "aspell_dict" (dictionary used on current buffer) +* aspell: fix creation of spellers when number of dictionaries is different + between two buffers * irc: add command /quiet, fix display of messages 728/729 (quiet list, end of quiet list) (task #12278) * irc: add option irc.network.alternate_nick to disable dynamic nick generation diff --git a/src/plugins/aspell/weechat-aspell.c b/src/plugins/aspell/weechat-aspell.c index 8a8faf029..e648de849 100644 --- a/src/plugins/aspell/weechat-aspell.c +++ b/src/plugins/aspell/weechat-aspell.c @@ -20,7 +20,7 @@ */ /* - * weechat-aspell.c: aspell plugin for WeeChat: use color to show mispelled + * weechat-aspell.c: aspell plugin for WeeChat: use color to show misspelled * words in input line */ @@ -302,21 +302,28 @@ weechat_aspell_spellers_already_ok (const char *dict_list) if (!dict_list || !weechat_aspell_spellers) return 0; - rc = 0; + rc = 1; argv = weechat_string_split (dict_list, ",", 0, 0, &argc); if (argv) { ptr_speller = weechat_aspell_spellers; - for (i = 0; (i < argc) && ptr_speller; i++) + for (i = 0; i < argc; i++) { - if (strcmp (ptr_speller->lang, argv[i]) == 0) + if (!ptr_speller) { - rc = 1; + rc = 0; + break; + } + if (strcmp (ptr_speller->lang, argv[i]) != 0) + { + rc = 0; break; } ptr_speller = ptr_speller->next_speller; } + if (ptr_speller && ptr_speller->next_speller) + rc = 0; weechat_string_free_split (argv); } |