mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-29 15:26:05 +00:00
fix cursor movement (up/down) problem at the end of lines in insets and table cells.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18293 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3121dd4269
commit
5d9e65058c
@ -991,10 +991,10 @@ bool Text::cursorUp(Cursor & cur)
|
|||||||
else
|
else
|
||||||
row = pm.pos2row(cur.pos());
|
row = pm.pos2row(cur.pos());
|
||||||
|
|
||||||
// remember current position only if we are not at the end of a row.
|
int x = cur.targetX();
|
||||||
if (cur.pos() != pm.rows()[row].endpos())
|
cur.setTargetX();
|
||||||
cur.setTargetX();
|
if (cur.pos() != pm.rows()[row].endpos() || x < cur.targetX())
|
||||||
int const x = cur.targetX();
|
x = cur.targetX();
|
||||||
|
|
||||||
if (!cur.selection()) {
|
if (!cur.selection()) {
|
||||||
int const y = bv_funcs::getPos(cur.bv(), cur, cur.boundary()).y_;
|
int const y = bv_funcs::getPos(cur.bv(), cur, cur.boundary()).y_;
|
||||||
@ -1050,10 +1050,10 @@ bool Text::cursorDown(Cursor & cur)
|
|||||||
else
|
else
|
||||||
row = pm.pos2row(cur.pos());
|
row = pm.pos2row(cur.pos());
|
||||||
|
|
||||||
// remember current position only if we are not at the end of a row.
|
int x = cur.targetX();
|
||||||
if (cur.pos() != pm.rows()[row].endpos())
|
cur.setTargetX();
|
||||||
cur.setTargetX();
|
if (cur.pos() != pm.rows()[row].endpos() || x < cur.targetX())
|
||||||
int const x = cur.targetX();
|
x = cur.targetX();
|
||||||
|
|
||||||
if (!cur.selection()) {
|
if (!cur.selection()) {
|
||||||
int const y = bv_funcs::getPos(cur.bv(), cur, cur.boundary()).y_;
|
int const y = bv_funcs::getPos(cur.bv(), cur, cur.boundary()).y_;
|
||||||
|
Loading…
Reference in New Issue
Block a user