Skip to content
Snippets Groups Projects
Commit 37ab76c9 authored by Franck Dary's avatar Franck Dary
Browse files

Its now impossible to have empty forms

parent 6fd7b396
No related branches found
No related tags found
No related merge requests found
......@@ -386,7 +386,15 @@ Action Action::addCurCharToCurWord()
auto appliable = [](const Config & config, const Action &)
{
return config.hasCharacter(config.getCharacterIndex()) and !util::isIllegal(config.getLetter(config.getCharacterIndex()));
if (!config.hasCharacter(config.getCharacterIndex()))
return false;
auto letter = config.getLetter(config.getCharacterIndex());
if (letter == ' ')
return !util::isEmpty(config.getAsFeature("FORM", config.getWordIndex()));
return !util::isIllegal(letter);
};
return {Type::Write, apply, undo, appliable};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment