mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Correct caret position from the start
This commit is contained in:
parent
8dfe07b5b5
commit
ba8ca0e384
@ -3065,6 +3065,8 @@ void BufferView::caretPosAndDim(Point & p, Dimension & dim) const
|
|||||||
dim.wid = lyxrc.cursor_width;
|
dim.wid = lyxrc.cursor_width;
|
||||||
|
|
||||||
p = getPos(cur);
|
p = getPos(cur);
|
||||||
|
// center fat carets horizontally
|
||||||
|
p.x_ -= dim.wid / 2;
|
||||||
p.y_ -= dim.asc;
|
p.y_ -= dim.asc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,9 +138,8 @@ public:
|
|||||||
{
|
{
|
||||||
if (dim.empty())
|
if (dim.empty())
|
||||||
return;
|
return;
|
||||||
// correction is (1) for horizontal scrolling and (2) for
|
// correction for horizontal scrolling
|
||||||
// better positionning of large cursors.
|
int const xx = x - horiz_offset;
|
||||||
int const xx = x - horiz_offset - dim.wid / 2;
|
|
||||||
int const lx = dim.height() / 3;
|
int const lx = dim.height() / 3;
|
||||||
|
|
||||||
// draw caret box
|
// draw caret box
|
||||||
|
Loading…
Reference in New Issue
Block a user