bool InsetMathMacro::completionSupported(Cursor const & cur) const
{
+ if (cur.buffer()->isReadonly())
+ return false;
+
if (displayMode() != DISPLAY_UNFOLDED)
return InsetMathNest::completionSupported(cur);
bool InsetMathMacro::inlineCompletionSupported(Cursor const & cur) const
{
+ if (cur.buffer()->isReadonly())
+ return false;
+
if (displayMode() != DISPLAY_UNFOLDED)
return InsetMathNest::inlineCompletionSupported(cur);
if (displayMode() != DISPLAY_UNFOLDED)
return InsetMathNest::completionPrefix(cur);
- if (!completionSupported(cur))
- return docstring();
-
return "\\" + name();
}
bool InsetMathMacro::insertCompletion(Cursor & cur, docstring const & s, bool finished)
{
+ if (cur.buffer()->isReadonly())
+ return false;
+
if (displayMode() != DISPLAY_UNFOLDED)
return InsetMathNest::insertCompletion(cur, s, finished);