diff --git a/src/frontends/qt4/GuiSpellchecker.cpp b/src/frontends/qt4/GuiSpellchecker.cpp index 0bcd8f1020..5a57971c47 100644 --- a/src/frontends/qt4/GuiSpellchecker.cpp +++ b/src/frontends/qt4/GuiSpellchecker.cpp @@ -430,6 +430,8 @@ void GuiSpellchecker::replace(docstring const & replacement) LYXERR(Debug::GUI, "GuiSpellchecker::replace(" << to_utf8(replacement) << ")"); BufferView * bv = const_cast(bufferview()); + if (!bv->cursor().inTexted()) + return; cap::replaceSelectionWithString(bv->cursor(), replacement, true); bv->buffer().markDirty(); // If we used an LFUN, we would not need that diff --git a/status.16x b/status.16x index 260018f11c..150151ed6f 100644 --- a/status.16x +++ b/status.16x @@ -129,8 +129,11 @@ What's new - Fix assertion when pressing down arrow in the command buffer while the history is empty (bug 6001). -- Fix assertion when selecting with Shift-button in math editor (bug - 6026). +- Fix assertion when selecting with Shift-button in math editor (bugs + 5046 and 6026). + +- Fix assertion when starting spellchecker in math mode and clicking + "replace" (bug 6013) - Make Tools>Statistics ignore Note insets and inactive branches (bug 2566).