mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
fix cursor positioning in non-grid nestinsets, and selection enclosure
when inserting font or deco insets. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9784 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
719dc8c0b2
commit
f4c0f6ec8b
@ -1,3 +1,9 @@
|
||||
2005-04-06 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
* math_nestinset.C (doDispatch): fix cursor positioning in
|
||||
non-grid nestinsets, and selection enclosure when inserting
|
||||
font or deco insets.
|
||||
|
||||
2005-04-05 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
* math_amsarrayinset.C:
|
||||
|
@ -557,7 +557,7 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd)
|
||||
cur.clearTargetX();
|
||||
if (cur.pos() != cur.lastpos()) {
|
||||
cur.pos() = cur.lastpos();
|
||||
} else if (cur.col() != cur.lastcol()) {
|
||||
} else if (ncols() && (cur.col() != cur.lastcol())) {
|
||||
cur.idx() = cur.idx() - cur.col() + cur.lastcol();
|
||||
cur.pos() = cur.lastpos();
|
||||
} else if (cur.idx() != cur.lastidx()) {
|
||||
@ -795,10 +795,16 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd)
|
||||
// FIXME: We probably should swap parts of "math-insert" and "self-insert"
|
||||
// handling such that "self-insert" works on "arbitrary stuff" too, and
|
||||
// math-insert only handles special math things like "matrix".
|
||||
case LFUN_INSERT_MATH:
|
||||
case LFUN_INSERT_MATH: {
|
||||
recordUndo(cur, Undo::ATOMIC);
|
||||
cur.niceInsert(cmd.argument);
|
||||
MathArray ar;
|
||||
asArray(cmd.argument, ar);
|
||||
if (ar.size() == 1 && (ar[0].nucleus()->asNestInset())) {
|
||||
cur.handleNest(ar[0]);
|
||||
} else
|
||||
cur.niceInsert(cmd.argument);
|
||||
break;
|
||||
}
|
||||
|
||||
case LFUN_DIALOG_SHOW_NEW_INSET: {
|
||||
string const & name = cmd.argument;
|
||||
|
Loading…
Reference in New Issue
Block a user