mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-10 18:58:10 +00:00
two bits for cursor navigation inside insets
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8428 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
4bcfc43c29
commit
83f68485ee
@ -1,3 +1,7 @@
|
||||
2004-02-13 Alfredo Braunstein <abraunst@lyx.org>
|
||||
|
||||
* text2.C (cursorUp, cursorDown): fix coords
|
||||
(moveUp): fix crash
|
||||
|
||||
2004-02-12 André Pönitz <poenitz@gmx.net>
|
||||
|
||||
|
@ -1400,7 +1400,7 @@ DispatchResult LyXText::moveLeftIntern(LCursor & cur,
|
||||
|
||||
DispatchResult LyXText::moveUp(LCursor & cur)
|
||||
{
|
||||
if (cur.par() == 0 && cur.row() == 0)
|
||||
if (cur.par() == 0 && cur.crow() == 0)
|
||||
return DispatchResult(false, FINISHED_UP);
|
||||
cursorUp(cur, false);
|
||||
cur.clearSelection();
|
||||
@ -1468,7 +1468,7 @@ void LyXText::cursorUp(LCursor & cur, bool selecting)
|
||||
Row const & row = cur.textRow();
|
||||
int x = cur.x_target();
|
||||
int y = cursorY(cur.current()) - row.baseline() - 1;
|
||||
setCursorFromCoordinates(x, y);
|
||||
setCursorFromCoordinates(cur.current(), x - xo_, y - yo_);
|
||||
|
||||
if (!selecting) {
|
||||
InsetBase * inset_hit = checkInsetHit(cur.x_target(), y);
|
||||
@ -1483,7 +1483,7 @@ void LyXText::cursorDown(LCursor & cur, bool selecting)
|
||||
Row const & row = cur.textRow();
|
||||
int x = cur.x_target();
|
||||
int y = cursorY(cur.current()) - row.baseline() + row.height() + 1;
|
||||
setCursorFromCoordinates(cur.current(), x, y);
|
||||
setCursorFromCoordinates(cur.current(), x - xo_, y - yo_);
|
||||
|
||||
if (!selecting) {
|
||||
InsetBase * inset_hit = checkInsetHit(cur.x_target(), y);
|
||||
|
Loading…
Reference in New Issue
Block a user