- Cursor const & cur = bv->cursor();
- bool current_word = false;
- if (par_.id() == cur.paragraph().id()) {
- pos_type cpos = cur.pos();
+ DocIterator const nw = bv->cursor().newWord();
+ bool new_word = false;
+ if (!nw.empty() && par_.id() == nw.paragraph().id()) {
+ pos_type cpos = nw.pos();