mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-10 18:58:10 +00:00
Fix bug 5573. http://bugzilla.lyx.org/show_bug.cgi?id=5573.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28397 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
1fe1080cf6
commit
24cd681863
@ -819,7 +819,8 @@ void BufferView::showCursor(DocIterator const & dit)
|
||||
if (ypos - row_dim.ascent() < 0)
|
||||
scrolled = scrollUp(- ypos + row_dim.ascent());
|
||||
else if (ypos + row_dim.descent() > height_)
|
||||
scrolled = scrollDown(ypos - height_ + row_dim.descent());
|
||||
scrolled = scrollDown(ypos - defaultRowHeight());
|
||||
|
||||
// else, nothing to do, the cursor is already visible so we just return.
|
||||
if (scrolled != 0) {
|
||||
updateMetrics();
|
||||
@ -845,8 +846,10 @@ void BufferView::showCursor(DocIterator const & dit)
|
||||
d->anchor_ypos_ = offset + pm.ascent();
|
||||
else if (d->anchor_pit_ == max_pit)
|
||||
d->anchor_ypos_ = height_ - offset - row_dim.descent();
|
||||
else if (offset > height_)
|
||||
d->anchor_ypos_ = height_ - offset - defaultRowHeight();
|
||||
else
|
||||
d->anchor_ypos_ = defaultRowHeight() * 2 - offset - row_dim.descent();
|
||||
d->anchor_ypos_ = defaultRowHeight() * 2;
|
||||
|
||||
updateMetrics();
|
||||
buffer_.changed();
|
||||
|
Loading…
Reference in New Issue
Block a user