mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
fixed spelling correction popup when there is no extra dictionary
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1335 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -519,10 +519,11 @@ String spellcheck_word_at(const String& str, size_t start) {
|
||||
void spellcheck_language_at(const String& str, size_t error_pos, SpellChecker** out) {
|
||||
String tag = tag_at(str,error_pos);
|
||||
size_t pos = min(tag.find_first_of(_(':')), tag.size()-1);
|
||||
size_t pos2 = min(tag.find_first_of(_(':'),pos+1), tag.size()-1);
|
||||
size_t pos2 = min(tag.find_first_of(_(':'),pos+1), tag.size());
|
||||
String language = tag.substr(pos+1,pos2-pos-1);
|
||||
if (language.empty()) return;
|
||||
out[0] = &SpellChecker::get(language);
|
||||
if (pos2 >= tag.size()) return;
|
||||
String extra = tag.substr(pos2+1);
|
||||
if (extra.empty()) return;
|
||||
out[1] = &SpellChecker::get(extra,language);
|
||||
|
||||
Reference in New Issue
Block a user