>>>>> "Juergen" == Juergen Spitzmueller <[EMAIL PROTECTED]> writes:
Juergen> Jean-Marc Lasgouttes wrote: >> The patch is wrong, because the index is not populated by >> LFUN_PASTE (there is no underlying text inset). Try this one >> instead. Juergen> It works indeed. Would you like to include it? I am not sure the patch is really right: if I insert a TOC inset, it will mean that the selection is not replaced anymore, but it stays here. Actually, only INDEX requires to use the selection without deleting it. What about this different version? JMarc
Index: src/text3.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text3.C,v retrieving revision 1.29.2.3 diff -u -p -r1.29.2.3 text3.C --- src/text3.C 29 Dec 2003 13:27:26 -0000 1.29.2.3 +++ src/text3.C 28 Nov 2005 13:44:53 -0000 @@ -1614,6 +1614,17 @@ Inset::RESULT LyXText::dispatch(FuncRequ break; } + case LFUN_INDEX_INSERT: { + Inset * inset = createInset(cmd); + if (inset) { + BufferView * bv = cmd.view(); + if (bv->insertInset(inset)) + inset->edit(bv); + else + delete inset; + } + break; + } #if 0 case LFUN_INSET_LIST: @@ -1637,7 +1648,6 @@ Inset::RESULT LyXText::dispatch(FuncRequ case LFUN_INSERT_URL: case LFUN_INSET_EXTERNAL: - case LFUN_INDEX_INSERT: // Just open the inset doInsertInset(this, cmd, true, false); break;