+ if (opt.forward) {
+ if (opt.matchword) { // Skip word-characters if we are in the mid of a word
+ Paragraph const & par = cur.paragraph();
+ if ((cur.pos() > 0) && !par.isWordSeparator(cur.pos() -1, true)) {
+ while (cur.pos() < par.size()) {
+ if (par.isWordSeparator(cur.pos(), true))
+ break;
+ else
+ cur.forwardPos();
+ }
+ }
+ opt.matchword = false;
+ }