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

Corrected bug where text metadata would not contain the first word of sentence...

Corrected bug where text metadata would not contain the first word of sentence if it was a multiword
parent dadc0e9a
No related branches found
No related tags found
No related merge requests found
...@@ -80,10 +80,10 @@ Action Action::consumeCharacterIndex(util::utf8string consumed) ...@@ -80,10 +80,10 @@ Action Action::consumeCharacterIndex(util::utf8string consumed)
{ {
auto apply = [consumed](Config & config, Action &) auto apply = [consumed](Config & config, Action &)
{ {
config.moveCharacterIndex(consumed.size());
config.getLastNotEmptyHyp(Config::rawRangeStartColName, config.getWordIndex()) = fmt::format("{}", config.getCharacterIndex()); config.getLastNotEmptyHyp(Config::rawRangeStartColName, config.getWordIndex()) = fmt::format("{}", config.getCharacterIndex());
config.getLastNotEmptyHyp(Config::rawRangeEndColName, config.getWordIndex()) = fmt::format("{}", config.getCharacterIndex() + consumed.size()); config.getLastNotEmptyHyp(Config::rawRangeEndColName, config.getWordIndex()) = fmt::format("{}", config.getCharacterIndex() + consumed.size());
config.moveCharacterIndex(consumed.size());
}; };
auto undo = [consumed](Config & config, Action &) auto undo = [consumed](Config & config, Action &)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment