diff --git a/src/ChangeLog b/src/ChangeLog index 26f367fe6b..b03f12b384 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-11-29 Jean-Marc Lasgouttes + + * text3.C (dispatch/LFUN_INDEX_INSERT): when a selection is set, + do not remove it (this inset behaves differently from the others). + 2005-11-29 Jean-Marc Lasgouttes Fix bug 2096. diff --git a/src/text3.C b/src/text3.C index 45fe7a8d11..65e803f4d2 100644 --- a/src/text3.C +++ b/src/text3.C @@ -1220,11 +1220,18 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd) cur.dispatch(FuncRequest(LFUN_LAYOUT, "Caption")); break; - case LFUN_INDEX_INSERT: - // Just open the inset - doInsertInset(cur, this, cmd, true, false); + case LFUN_INDEX_INSERT: { + InsetBase * inset = createInset(&cur.bv(), cmd); + if (!inset) + break; + + recordUndo(cur); + cur.clearSelection(); + insertInset(cur, inset); + inset->edit(cur, true); cur.posRight(); break; + } case LFUN_INDEX_PRINT: case LFUN_TOC_INSERT: