mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-14 09:32:20 +00:00
Fix inset-begin and inset-end. Now, if the cursor was at the beginning of a paragraph in the middle of the inset, inset-begin would jump out of the inset.
See r31199. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31599 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a18553e403
commit
9078a80264
@ -544,7 +544,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
|||||||
case LFUN_INSET_BEGIN:
|
case LFUN_INSET_BEGIN:
|
||||||
case LFUN_INSET_BEGIN_SELECT:
|
case LFUN_INSET_BEGIN_SELECT:
|
||||||
needsUpdate |= cur.selHandle(cmd.action == LFUN_INSET_BEGIN_SELECT);
|
needsUpdate |= cur.selHandle(cmd.action == LFUN_INSET_BEGIN_SELECT);
|
||||||
if (cur.depth() == 1 || cur.pos() > 0)
|
if (cur.depth() == 1 || !cur.top().at_begin())
|
||||||
needsUpdate |= cursorTop(cur);
|
needsUpdate |= cursorTop(cur);
|
||||||
else
|
else
|
||||||
cur.undispatched();
|
cur.undispatched();
|
||||||
@ -554,7 +554,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
|||||||
case LFUN_INSET_END:
|
case LFUN_INSET_END:
|
||||||
case LFUN_INSET_END_SELECT:
|
case LFUN_INSET_END_SELECT:
|
||||||
needsUpdate |= cur.selHandle(cmd.action == LFUN_INSET_END_SELECT);
|
needsUpdate |= cur.selHandle(cmd.action == LFUN_INSET_END_SELECT);
|
||||||
if (cur.depth() == 1 || cur.pos() < cur.lastpos())
|
if (cur.depth() == 1 || !cur.top().at_end())
|
||||||
needsUpdate |= cursorBottom(cur);
|
needsUpdate |= cursorBottom(cur);
|
||||||
else
|
else
|
||||||
cur.undispatched();
|
cur.undispatched();
|
||||||
|
@ -192,6 +192,9 @@ What's new
|
|||||||
|
|
||||||
- Fix parsing of selection when used as argument of a math macro (bug 6270).
|
- Fix parsing of selection when used as argument of a math macro (bug 6270).
|
||||||
|
|
||||||
|
- Fix inset-[begin|end][-select] when the cursor is at the beginning or
|
||||||
|
end of a paragraph.
|
||||||
|
|
||||||
|
|
||||||
* DOCUMENTATION AND LOCALIZATION
|
* DOCUMENTATION AND LOCALIZATION
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user