From: Jean-Marc Lasgouttes Date: Tue, 2 Nov 2004 14:25:14 +0000 (+0000) Subject: fix cursor when inserting some insets X-Git-Tag: 1.6.10~14875 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=d366b652faf8bd5a4df172bc6e1f5eb666146f72;p=features.git fix cursor when inserting some insets git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9158 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/ChangeLog b/src/ChangeLog index 8f01414901..5599a9a249 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2004-11-02 Jean-Marc Lasgouttes + + * text3.C (specialChar, dispatch): make sure cursor moves to the + right after inserting an inset + 2004-11-02 José Matos * output_docbook.C (docbook): @@ -35,9 +40,11 @@ 2004-10-30 José Matos - * 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 @@ -68,9 +75,10 @@ 2004-10-28 José Matos - * 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 @@ -100,7 +108,8 @@ 2004-10-25 José Matos - * 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 diff --git a/src/text3.C b/src/text3.C index 869cda8b7b..9b46dce830 100644 --- a/src/text3.C +++ b/src/text3.C @@ -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;