diff --git a/src/Changes.cpp b/src/Changes.cpp index cbdbc269f6..685e69b0ee 100644 --- a/src/Changes.cpp +++ b/src/Changes.cpp @@ -411,7 +411,10 @@ void Changes::addToToc(DocIterator const & cdit, Buffer const & buffer) const break; } dit.pos() = it->range.start; - str += " " + dit.paragraph().asString(it->range.start, it->range.end); + Paragraph const & par = dit.paragraph(); + str += " " + par.asString(it->range.start, max(par.size(), it->range.end)); + // FIXME: find an unicode character for carriage return presentation if + // present; i.e. when it->range.end > par.size() docstring const & author = author_list.get(it->change.author).name(); Toc::iterator it = change_list.item(0, author); if (it == change_list.end()) {