summaryrefslogtreecommitdiff
path: root/src/plugins/spell/spell-speller.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/spell/spell-speller.c')
-rw-r--r--src/plugins/spell/spell-speller.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/spell/spell-speller.c b/src/plugins/spell/spell-speller.c
index f8662e0ca..3b3229a27 100644
--- a/src/plugins/spell/spell-speller.c
+++ b/src/plugins/spell/spell-speller.c
@@ -97,6 +97,13 @@ spell_speller_check_dictionaries (const char *dict_list)
char **argv;
int argc, i;
+ if (!dict_list)
+ return;
+
+ /* special value "-" is used to disable spell checking on a buffer */
+ if (strcmp (dict_list, "-") == 0)
+ return;
+
if (dict_list)
{
argv = weechat_string_split (dict_list, ",", NULL,
@@ -381,7 +388,7 @@ spell_speller_buffer_new (struct t_gui_buffer *buffer)
new_speller_buffer->modifier_result = NULL;
buffer_dicts = spell_get_dict (buffer);
- if (buffer_dicts)
+ if (buffer_dicts && (strcmp (buffer_dicts, "-") != 0))
{
dicts = weechat_string_split (buffer_dicts, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT