On Thu, 11 Oct 2007 14:11:03 +0200 Helge Hafting <[EMAIL PROTECTED]> wrote:
> Different idea: > Make the optarg inset so it only will go at the > start of the paragraph. No cursor position in front of it so > the cursor can't go there. And special-case its insertion so it > always inserts at the front of the paragraph, rather than anywhere. > If the user can't move it away, then the fact that it is implemented > by the normal inset mechanism won't matter. Attached will place any inserted optarg at the beginning. (No, this doesn't prevent putting stuff in front of it.) Actually I consider this stuff irrelevant. Just because laTeX put the optarg at the beginning, doesn't mean we should. And you can still cut'n paste it any place you like ;-/ - Martin
Index: Text3.cpp =================================================================== --- Text3.cpp (revision 20898) +++ Text3.cpp (working copy) @@ -1133,6 +1133,8 @@ case LFUN_MARGINALNOTE_INSERT: case LFUN_OPTIONAL_INSERT: case LFUN_ENVIRONMENT_INSERT: + if (cmd.action == LFUN_OPTIONAL_INSERT) + cur.pos() = 0; // Open the inset, and move the current selection // inside it. doInsertInset(cur, this, cmd, true, true);