]> git.lyx.org Git - features.git/commitdiff
* src/text3.C (doDispatch):
authorJürgen Spitzmüller <spitz@lyx.org>
Wed, 17 Jan 2007 15:40:55 +0000 (15:40 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Wed, 17 Jan 2007 15:40:55 +0000 (15:40 +0000)
- record undo on LFUN_BREAKLINE (bug 3111).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16730 a592a061-630c-0410-9148-cb99ea01b6c8

src/text3.C

index 2e4f09c84e17c13c698aeddd6b885c3eb8283e55..86c69d0646be73b59307edcc411b1dd33e30883a 100644 (file)
@@ -554,6 +554,8 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
        case LFUN_BREAK_LINE: {
                // Not allowed by LaTeX (labels or empty par)
                if (cur.pos() > cur.paragraph().beginOfBody()) {
+                       if (!cur.selection())
+                               recordUndo(cur);
                        cap::replaceSelection(cur);
                        cur.insert(new InsetNewline);
                        cur.posRight();