]> git.lyx.org Git - features.git/commitdiff
Backport fix for bug #7905. We don't want to move out of the inset unless
authorRichard Heck <rgheck@comcast.net>
Tue, 22 Nov 2011 18:49:59 +0000 (18:49 +0000)
committerRichard Heck <rgheck@comcast.net>
Tue, 22 Nov 2011 18:49:59 +0000 (18:49 +0000)
we've put something into it. (We also don't need to copy an empty string
into it.)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@40242 a592a061-630c-0410-9148-cb99ea01b6c8

src/Text3.cpp
status.20x

index c837a1429d53736ed5f9a58b05811e1183cfbf6c..9830f8a0269db04b60bf1dc8e355ec16c63413da 100644 (file)
@@ -246,8 +246,10 @@ static bool doInsertInset(Cursor & cur, Text * text,
                        inset->edit(cur, true);
                // Now put this into inset
                Font const f(inherit_font, cur.current_font.language());
-               cur.text()->insertStringAsLines(cur, ds, f);
-               cur.leaveInset(*inset);
+               if (!ds.empty()) {
+                       cur.text()->insertStringAsLines(cur, ds, f);
+                       cur.leaveInset(*inset);
+               }
                return true;
        }
 
index 08c72f909c79a34431d7037b9e2b069eb3079c02..cf5fabebbdb39c7284904f58e237cc5699f9bfa0 100644 (file)
@@ -194,13 +194,13 @@ What's new
 
 * USER INTERFACE
 
-- Group correctly Koma book environments inside environment combo-box listing.
+- Correctly group Koma book environments inside environment combo-box listing.
 
 - Add undo for change of text language when document language is changed.
-  When a document is not multi-lingual the text contents is changed to the
+  When a document is not multi-lingual, the text contents is changed to the
   new language. This should be recorded for Undo (bug 7740).
 
-- Adjust the cursor language after document language change had changed the
+- Adjust the cursor language after document language change has changed the
   text language (bug 7681).
 
 - Correctly sort modules in Document->Settings and formats in the "Other 
@@ -272,6 +272,8 @@ What's new
 
 - Fix crash when changing labelwidth (bug 7873).
 
+- Keep cursor inside index inset when a blank one is created (bug 7905).
+
 
 * ADVANCED FIND AND REPLACE