diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 04ec31b035..3cd53dd1ba 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -3067,13 +3067,10 @@ bool Buffer::nextWord(DocIterator & from, DocIterator & to, ignoreword = true; } } else { // !isLetter(cur) - if (inword) - if (!word.empty() && !ignoreword) { - return true; - } - inword = false; + if (inword && !word.empty() && !ignoreword) + return true; + inword = false; } - to.forwardPos(); }