add delay if we have a selection going

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5767 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2002-12-03 09:57:59 +00:00
parent 842193f667
commit 2068180f37
2 changed files with 18 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2002-12-03 Lars Gullik Bjønnes <larsbj@gullik.net>
* screen.C (fitManualCursor): add delay if we have a selection
going
(fitCursor): ditto
2002-12-01 Lars Gullik Bjønnes <larsbj@gullik.net> 2002-12-01 Lars Gullik Bjønnes <larsbj@gullik.net>
* several files: ws changes * several files: ws changes

View File

@ -169,8 +169,13 @@ bool LyXScreen::fitManualCursor(BufferView * bv, LyXText * text,
if (newtop != text->first_y) { if (newtop != text->first_y) {
draw(text, bv, newtop); draw(text, bv, newtop);
text->first_y = newtop; text->first_y = newtop;
// Make the screen not scroll too fast when
// we have a selection.
if (text->selection.set())
usleep(200000);
return true; return true;
} }
return false; return false;
} }
@ -230,8 +235,14 @@ bool LyXScreen::fitCursor(LyXText * text, BufferView * bv)
// Is a change necessary? // Is a change necessary?
int const newtop = topCursorVisible(text->cursor, text->first_y); int const newtop = topCursorVisible(text->cursor, text->first_y);
bool const result = (newtop != text->first_y); bool const result = (newtop != text->first_y);
if (result) if (result) {
draw(text, bv, newtop); draw(text, bv, newtop);
// Make the screen not scroll too fast when
// we have a selection.
if (text->selection.set())
usleep(200000);
}
return result; return result;
} }