// to touch all (math)inset's draw() methods. Right now, we'll store
// absolute value, and make them here relative, only to make them
// absolute again when actually drawing the cursor. What a mess.
- LASSERT(&sl.inset() == this, /**/);
+ LASSERT(&sl.inset() == this, return);
MathData const & ar = sl.cell();
CoordCache const & coord_cache = bv.coordCache();
if (!coord_cache.getArrays().has(&ar)) {
bool InsetMathNest::idxNext(Cursor & cur) const
{
- LASSERT(&cur.inset() == this, /**/);
+ LASSERT(&cur.inset() == this, return false);
if (cur.idx() == cur.lastidx())
return false;
++cur.idx();
bool InsetMathNest::idxPrev(Cursor & cur) const
{
- LASSERT(&cur.inset() == this, /**/);
+ LASSERT(&cur.inset() == this, return false);
if (cur.idx() == 0)
return false;
--cur.idx();
bool InsetMathNest::idxFirst(Cursor & cur) const
{
- LASSERT(&cur.inset() == this, /**/);
+ LASSERT(&cur.inset() == this, return false);
if (nargs() == 0)
return false;
cur.idx() = 0;
bool InsetMathNest::idxLast(Cursor & cur) const
{
- LASSERT(&cur.inset() == this, /**/);
+ LASSERT(&cur.inset() == this, return false);
if (nargs() == 0)
return false;
cur.idx() = cur.lastidx();
replaceSelection(cur);
docstring topaste;
if (cmd.argument().empty() && !theClipboard().isInternal())
- topaste = theClipboard().getAsText();
+ topaste = theClipboard().getAsText(Clipboard::PlainTextType);
else {
size_t n = 0;
idocstringstream is(cmd.argument());
act == LFUN_UP_SELECT;
cur.selHandle(select);
+ // handle autocorrect:
+ cur.autocorrect() = false;
+ cur.message(_("Autocorrect Off ('!' to enter)"));
+
// go up/down
bool up = act == LFUN_UP || act == LFUN_UP_SELECT;
bool successful = cur.upDownInMath(up);
case LFUN_MOUSE_DOUBLE:
case LFUN_MOUSE_TRIPLE:
case LFUN_WORD_SELECT:
+ case LFUN_INSET_SELECT_ALL:
cur.pos() = 0;
cur.idx() = 0;
cur.resetAnchor();
flag.setEnabled(false);
break;
+ case LFUN_CAPTION_INSERT:
+ flag.setEnabled(false);
+ break;
+
case LFUN_SPACE_INSERT: {
docstring const & name = cmd.argument();
if (name == "visible")
flag.setEnabled(!asHullInset());
break;
+ case LFUN_PASTE: {
+ docstring const & name = cmd.argument();
+ if (name == "html" || name == "latex")
+ flag.setEnabled(false);
+ break;
+ }
+
default:
ret = false;
break;
cur.backspace();
cur.niceInsert(MathAtom(new InsetMathComment(buf)));
} else if (c == '#') {
- LASSERT(cur.activeMacro(), /**/);
+ LASSERT(cur.activeMacro(), return false);
cur.activeMacro()->setName(name + docstring(1, c));
} else {
cur.backspace();
globals.push_back(from_ascii("\\root"));
globals.push_back(from_ascii("\\tabular"));
globals.push_back(from_ascii("\\stackrel"));
+ globals.push_back(from_ascii("\\stackrelthree"));
globals.push_back(from_ascii("\\binom"));
globals.push_back(from_ascii("\\choose"));
globals.push_back(from_ascii("\\brace"));