]> git.lyx.org Git - features.git/commitdiff
fix cursor when inserting some insets
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 2 Nov 2004 14:25:14 +0000 (14:25 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 2 Nov 2004 14:25:14 +0000 (14:25 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9158 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/text3.C

index 8f01414901810ccdc2171622a961ec21abe78c95..5599a9a24925f8795b996b173a930a55e3581164 100644 (file)
@@ -1,3 +1,8 @@
+2004-11-02  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * text3.C (specialChar, dispatch): make sure cursor moves to the
+       right after inserting an inset
+
 2004-11-02  José Matos  <jamatos@lyx.org>
 
        * output_docbook.C (docbook):
 
 2004-10-30  José Matos  <jamatos@lyx.org>
 
-       * paragraph.C (getFirstWord): the content should always be escaped there.
+       * paragraph.C (getFirstWord): the content should always be escaped
+       there. 
        (simpleDocBookOnePar):
-       * output_docbook.C (makeEnvironment): replace reference to CDATA to style pass_thru.
+       * output_docbook.C (makeEnvironment): replace reference to CDATA
+       to style pass_thru. 
 
 2004-10-30  José Matos  <jamatos@lyx.org>
 
 
 2004-10-28  José Matos  <jamatos@lyx.org>
 
-       * output_docbook.C (makeEnvironment): move id to broadest possible scope.
+       * output_docbook.C (makeEnvironment): move id to broadest possible
+       scope. 
 
-       * sgml.C (openTag): apply substitution of <> for all attribuites.
+       * sgml.C (openTag): apply substitution of <> for all attributes.
 
 2004-10-28  José Matos  <jamatos@lyx.org>
 
 
 2004-10-25  José Matos  <jamatos@lyx.org>
 
-       * output_docbook.C (makeCommand): merge two if's that tested the same condition.
+       * output_docbook.C (makeCommand): merge two if's that tested the
+       same condition. 
 
 2004-10-25  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
 
index 869cda8b7bfcb87817bcd63cd30bea3fa6716976..9b46dce830635025f9b750d5f877051e06b45587 100644 (file)
@@ -301,6 +301,7 @@ void specialChar(LCursor & cur, InsetSpecialChar::Kind kind)
 {
        lyx::cap::replaceSelection(cur);
        cur.insert(new InsetSpecialChar(kind));
+       cur.posRight();
 }
 
 
@@ -625,6 +626,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
                if (cur.pos() > cur.paragraph().beginOfBody()) {
                        lyx::cap::replaceSelection(cur);
                        cur.insert(new InsetNewline);
+                       cur.posRight();
                        moveCursor(cur, false);
                }
                break;
@@ -800,8 +802,10 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
        case LFUN_SPACE_INSERT:
                if (cur.paragraph().layout()->free_spacing)
                        insertChar(cur, ' ');
-               else
+               else {
                        doInsertInset(cur, this, cmd, false, false);
+                       cur.posRight();
+               }
                moveCursor(cur, false);
                break;
 
@@ -1488,6 +1492,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
                        setLayout(cur, tclass.defaultLayoutName());
                        setParagraph(cur, Spacing(), LYX_ALIGN_LAYOUT, string(), 0);
                        insertInset(cur, new InsetFloatList(cmd.argument));
+                       cur.posRight();
                } else {
                        lyxerr << "Non-existent float type: "
                               << cmd.argument << endl;