# HG changeset patch # User Mikael Berthe # Date 1424016425 -3600 # Node ID 46d1182d45be958313a50583915e74c4e5406186 # Parent 282531385f34fce37be647e3e4755aa2c4f5072e Spell checking: Fix wrong highlighting when no language can be used With the previous changeset, mcabber will try to spell check even if no language dictionnary was successfully loaded. This patch also displays a warning when a language cannot be loaded. diff -r 282531385f34 -r 46d1182d45be mcabber/mcabber/screen.c --- a/mcabber/mcabber/screen.c Sun Feb 15 16:23:30 2015 +0100 +++ b/mcabber/mcabber/screen.c Sun Feb 15 17:07:05 2015 +0100 @@ -4557,6 +4557,10 @@ sc = new_spell_checker(*lang_iter); if (sc) { spell_checkers = g_slist_append(spell_checkers, sc); + } else { + scr_LogPrint(LPRINT_LOGNORM, + "Warning: Could not load spell checker language '%s'.", + *lang_iter); } } } @@ -4601,6 +4605,10 @@ if (inputLine[0] == 0 || inputLine[0] == COMMAND_CHAR) return; + // Give up early if not languages are loaded + if (!spell_checkers) + return; + line_start = line; while (*line) {