commit 0662ffb98e136c5997fab7354e203044ac76974f
Author: Richard Heck <[email protected]>
Date: Sat Jun 25 01:39:59 2016 -0400
Fix #6344.
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 | 15 +--------------
status.23x | 2 ++
2 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/src/Text3.cpp b/src/Text3.cpp
index e0358fc..9d75274 100644
--- a/src/Text3.cpp
+++ b/src/Text3.cpp
@@ -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();
diff --git a/status.23x b/status.23x
index fbd0357..970f234 100644
--- a/status.23x
+++ b/status.23x
@@ -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