mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 10:58:52 +00:00
fix last printable pos
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6182 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
ced5b14359
commit
e3833fbf0a
@ -1,3 +1,7 @@
|
||||
2003-02-17 John Levon <levon@movementarian.org>
|
||||
|
||||
* lyxrow.C: fix lastPrintablePos()
|
||||
|
||||
2003-02-16 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
|
||||
|
||||
* bufferparams.C (writeLaTeX): add a std:here
|
||||
|
15
src/lyxrow.C
15
src/lyxrow.C
@ -147,12 +147,6 @@ namespace {
|
||||
|
||||
bool nextRowIsAllInset(Row const & row, pos_type last)
|
||||
{
|
||||
if (!row.next())
|
||||
return false;
|
||||
|
||||
if (row.par() != row.next()->par())
|
||||
return false;
|
||||
|
||||
if (!row.par()->isInset(last + 1))
|
||||
return false;
|
||||
|
||||
@ -166,9 +160,14 @@ bool nextRowIsAllInset(Row const & row, pos_type last)
|
||||
pos_type Row::lastPrintablePos() const
|
||||
{
|
||||
pos_type const last = lastPos();
|
||||
bool const ignore_space_at_last = !nextRowIsAllInset(*this, last);
|
||||
|
||||
if (ignore_space_at_last && par()->isSeparator(last))
|
||||
// if this row is an end of par, just act like lastPos()
|
||||
if (!next() || par() != next()->par())
|
||||
return last;
|
||||
|
||||
bool const nextrownotinset = !nextRowIsAllInset(*this, last);
|
||||
|
||||
if (nextrownotinset && par()->isSeparator(last))
|
||||
return last - 1;
|
||||
|
||||
return last;
|
||||
|
Loading…
Reference in New Issue
Block a user