]> git.lyx.org Git - features.git/commitdiff
Fix #6344.
authorRichard Heck <rgheck@lyx.org>
Sat, 25 Jun 2016 05:39:59 +0000 (01:39 -0400)
committerRichard Heck <rikiheck@lyx.org>
Sat, 21 Apr 2018 03:16:02 +0000 (23:16 -0400)
For some reason, special code was added for LFUN_INDEX_INSERT
when it was not actually needed. So just delete it.

(cherry picked from commit 83356ab9fed1b6ab24d129486ab8e3c7dfd6ea4a)

src/Text3.cpp
status.23x

index e0358fc46405fdd5be5f0917269e1d44fa205c01..9d75274b9e3dd3f432c947c6ad13ba0ab68615d9 100644 (file)
@@ -249,20 +249,7 @@ static bool doInsertInset(Cursor & cur, Text * text,
                ci->setButtonLabel();
 
        cur.recordUndo();
-       if (cmd.action() == LFUN_INDEX_INSERT) {
-               docstring ds = subst(text->getStringToIndex(cur), '\n', ' ');
-               text->insertInset(cur, inset);
-               if (edit)
-                       inset->edit(cur, true);
-               // Now put this into inset
-               Font const f(inherit_font, cur.current_font.language());
-               if (!ds.empty()) {
-                       cur.text()->insertStringAsLines(cur, ds, f);
-                       cur.leaveInset(*inset);
-               }
-               return true;
-       }
-       else if (cmd.action() == LFUN_ARGUMENT_INSERT) {
+       if (cmd.action() == LFUN_ARGUMENT_INSERT) {
                bool cotextinsert = false;
                InsetArgument const * const ia = static_cast<InsetArgument const *>(inset);
                Layout const & lay = cur.paragraph().layout();
index fbd0357978bac064b5f0ccb2488c6e4455287ef4..970f234013fbab14c10fc988049aa1eb7729d3c8 100644 (file)
@@ -212,6 +212,8 @@ What's new
 
 - Fix weird bug with counters when reloading with emergency file.
 
+- Handle math insets properly when inserting index entries (bug 6344).
+
 
 * INTERNALS