Added possibility of editing the word before adding it to user dictionary

This commit is contained in:
Ianos Gnatiuc 2005-11-30 11:17:17 +00:00
parent ec0141aa1d
commit 8036f5ef7e

View File

@ -1187,10 +1187,16 @@ int GMenuSChecker::Run(CSpellChecker &schecker, const char *word)
vcurshow(); vcurshow();
if (finaltag == TAG_ADDWORD) if (finaltag == TAG_ADDWORD)
{
char buff[1024];
strcpy(buff, word);
if (edit_string(buff, sizeof(buff), " Edit word ", 0) && !schecker.Check(buff))
{ {
schecker.AddWord(); schecker.AddWord();
return -2; return -2;
} }
}
else if ((finaltag > TAG_LANG) && (finaltag < TAG_MORE)) else if ((finaltag > TAG_LANG) && (finaltag < TAG_MORE))
{ {
schecker.Load(langs[finaltag-TAG_LANG-1].GetLangCode(), CFG->scheckeruserdic); schecker.Load(langs[finaltag-TAG_LANG-1].GetLangCode(), CFG->scheckeruserdic);