]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.cpp
The logic of the endParagraph() routine is wrong. We should first
[lyx.git] / src / BufferView.cpp
index 2820b7e46ff47b4f456e2ac7b2c4a7dfbafc8cbd..9a4e5d326adad34122b887751e460443f673a29c 100644 (file)
@@ -1655,9 +1655,10 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
                        from = doc_iterator_begin(&buffer_);
                        to = doc_iterator_end(&buffer_);
                }
-               int const words = countWords(from, to);
-               int const chars = countChars(from, to, false);
-               int const chars_blanks = countChars(from, to, true);
+               buffer_.updateStatistics(from, to);
+               int const words = buffer_.wordCount();
+               int const chars = buffer_.charCount(false);
+               int const chars_blanks = buffer_.charCount(true);
                docstring message;
                if (cur.selection())
                        message = _("Statistics for the selection:");