case LFUN_DOWN:
case LFUN_NEWLINE_INSERT:
case LFUN_MATH_EXTERN:
- case LFUN_MATH_MUTATE:
case LFUN_MATH_DISPLAY:
// we handle these
status.setEnabled(true);
return true;
+ case LFUN_MATH_MUTATE: {
+ HullType ht = hullType(cmd.argument());
+ status.setOnOff(type_ == ht);
+ status.setEnabled(true);
+ return true;
+ }
+
case LFUN_MATH_NUMBER_TOGGLE:
// FIXME: what is the right test, this or the one of
// LABEL_INSERT?
// LABEL_INSERT?
bool const enable = (type_ == hullMultline)
? (nrows() - 1 == cur.row())
- : display() != Inline;
+ : display() != Inline && nrows() > 1;
row_type const r = (type_ == hullMultline) ? nrows() - 1 : cur.row();
status.setEnabled(enable);
- status.setOnOff(numbered(r));
+ status.setOnOff(enable && numbered(r));
return true;
}