From b367640290d4d04a52ab6013433fd2444674d1f5 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Tue, 22 Nov 2011 18:49:59 +0000 Subject: [PATCH] Backport fix for bug #7905. We don't want to move out of the inset unless 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 | 6 ++++-- status.20x | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/Text3.cpp b/src/Text3.cpp index c837a1429d..9830f8a026 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -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; } diff --git a/status.20x b/status.20x index 08c72f909c..cf5fabebbd 100644 --- a/status.20x +++ b/status.20x @@ -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 -- 2.39.5