+2006-01-30 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
+
+ * * text2.C (deleteEmptyParagraphMechanism): fix off-by-one error of the start
+ pit of the uno range (bug 2022).
+
2006-01-28 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* messages.C (get): Only warn once if setlocale fails (bug 2177)
using std::endl;
using std::ostringstream;
using std::string;
+using std::max;
using std::min;
if (oldpar.empty() || (oldpar.size() == 1 && oldpar.isLineSeparator(0))) {
// Delete old par.
- recordUndo(old, Undo::ATOMIC,
- old.pit(), min(old.pit() + 1, old.lastpit()));
+ recordUndo(old, Undo::ATOMIC,
+ max(old.pit() - 1, 0),
+ min(old.pit() + 1, old.lastpit()));
ParagraphList & plist = old.text()->paragraphs();
plist.erase(plist.begin() + old.pit());