(Johnathan Burchill): change tracker fixes (bug 1827)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9685 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2005-02-28 07:43:12 +00:00
parent 1f735c7380
commit 2849fbae2a
3 changed files with 19 additions and 4 deletions

View File

@ -1,3 +1,12 @@
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

View File

@ -578,7 +578,9 @@ int Paragraph::stripLeadingSpaces()
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;
}

View File

@ -214,9 +214,13 @@ void breakParagraphConservative(BufferParams const & bparams,
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);
}
}
}