mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-28 14:58:36 +00:00
* src/text.C: check end-of-par BEFORE you accept/reject the rest of the par (I fear this code has to rewritten later)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16521 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
895416b103
commit
1cdbdc1bdc
10
src/text.C
10
src/text.C
@ -860,9 +860,8 @@ void LyXText::acceptChange(LCursor & cur)
|
||||
for (; pit <= et.pit(); ++pit) {
|
||||
pos_type left = (pit == it.pit() ? it.pos() : 0);
|
||||
pos_type right = (pit == et.pit() ? et.pos() : pars_[pit].size());
|
||||
pars_[pit].acceptChanges(left, right);
|
||||
|
||||
// handle imaginary end-of-par character
|
||||
// handle imaginary end-of-par character first
|
||||
if (right == pars_[pit].size() && !pars_[pit].isUnchanged(right)) {
|
||||
if (pars_[pit].isInserted(right)) {
|
||||
pars_[pit].setChange(right, Change(Change::UNCHANGED));
|
||||
@ -873,6 +872,8 @@ void LyXText::acceptChange(LCursor & cur)
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
pars_[pit].acceptChanges(left, right);
|
||||
}
|
||||
finishUndo();
|
||||
cur.clearSelection();
|
||||
@ -900,9 +901,8 @@ void LyXText::rejectChange(LCursor & cur)
|
||||
for (; pit <= et.pit(); ++pit) {
|
||||
pos_type left = (pit == it.pit() ? it.pos() : 0);
|
||||
pos_type right = (pit == et.pit() ? et.pos() : pars_[pit].size());
|
||||
pars_[pit].rejectChanges(left, right);
|
||||
|
||||
// handle imaginary end-of-par character
|
||||
// handle imaginary end-of-par character first
|
||||
if (right == pars_[pit].size() && !pars_[pit].isUnchanged(right)) {
|
||||
if (pars_[pit].isDeleted(right)) {
|
||||
pars_[pit].setChange(right, Change(Change::UNCHANGED));
|
||||
@ -913,6 +913,8 @@ void LyXText::rejectChange(LCursor & cur)
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
pars_[pit].rejectChanges(left, right);
|
||||
}
|
||||
finishUndo();
|
||||
cur.clearSelection();
|
||||
|
Loading…
Reference in New Issue
Block a user