Check if we are on column 0 for special case

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10260 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2005-07-16 21:19:36 +00:00
parent 372365845d
commit 5be1c17c7c
2 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2005-07-16 Juergen Vigna <jug@lyx.org>
* text2.C (getColumnNearX): hopefully got it right now,
check if we are on column 0 for special case.
2005-07-16 Juergen Vigna <jug@lyx.org>
* text2.C (getColumnNearX): handle special case Newline Inset

View File

@ -856,16 +856,17 @@ pos_type LyXText::getColumnNearX(pit_type const pit,
}
x = int(tmpx) + xo;
int const col = c - row.pos();
if (end == par.size())
return c - row.pos();
return col;
if (c && !par.isLineSeparator(c-1) && !par.isNewline(c-1)) {
if (!col && !par.isLineSeparator(c-1) && !par.isNewline(c-1)) {
boundary = true;
return c - row.pos();
return col;
}
return min(c - row.pos(), end - 1 - row.pos());
return min(col, end - 1 - row.pos());
}