+2005-02-28 Johnathan Burchill <jkerrb@users.sourceforge.net>
+
+ * paragraph.C: fix for confused change tracker when pasting
+ text that begins with a lineseparator. [bug 1827]
+ (setChange(0, Change::INSERTED);)
+
+ * paragraph_funcs.C: fix for lost changes on triple-paste
+ in change tracking mode [bug 1827] (par.setChange()).
+
2005-02-24 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* text2.C (updateCounters, setCounter, expandLabel): move to
int i = 0;
while (!empty() && (isNewline(0) || isLineSeparator(0))) {
- pimpl_->eraseIntern(0);
+ // Set Change::Type to Change::INSERTED to quietly remove it
+ setChange(0, Change::INSERTED);
+ erase(0);
++i;
}
if (moveItem(par, tmp, bparams, i, j - pos, change))
++j;
}
-
- for (pos_type k = pos_end; k >= pos; --k)
- par.eraseIntern(k);
+ // If tracking changes, set all the text that is to be
+ // erased to Type::INSERTED.
+ for (pos_type k = pos_end; k >= pos; --k) {
+ if (bparams.tracking_changes)
+ par.setChange(k, Change::INSERTED);
+ par.erase(k);
+ }
}
}