mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-22 16:37:28 +00:00
Fix for fitcursor.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20536 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3d3c5546a1
commit
5172a3122e
@ -258,12 +258,10 @@ Point getPos(BufferView const & bv, DocIterator const & dit, bool boundary)
|
|||||||
// FIXME: This does not work within mathed!
|
// FIXME: This does not work within mathed!
|
||||||
CurStatus status(BufferView const * bv, DocIterator const & dit)
|
CurStatus status(BufferView const * bv, DocIterator const & dit)
|
||||||
{
|
{
|
||||||
// FIXME: it's be better to have something like TextMetrics::status().
|
Point const p = bv_funcs::getPos(*bv, dit, dit.boundary());
|
||||||
TextMetrics const & tm = bv->textMetrics(dit.bottom().text());
|
if (p.y_ < 0)
|
||||||
int par_pos = tm.parPosition(dit.bottom().pit());
|
|
||||||
if (par_pos < 0)
|
|
||||||
return CUR_ABOVE;
|
return CUR_ABOVE;
|
||||||
else if (par_pos > bv->workHeight())
|
else if (p.y_ > bv->workHeight())
|
||||||
return CUR_BELOW;
|
return CUR_BELOW;
|
||||||
|
|
||||||
return CUR_INSIDE;
|
return CUR_INSIDE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user