void LCursor::paste(string const & data)
{
- dispatch(FuncRequest(LFUN_PASTE, data));
+ if (!data.empty())
+ dispatch(FuncRequest(LFUN_PASTE, data));
}
selection() = true;
anchor_ = where;
pos() += n;
- // Open all collapsed insets
- for (int i = depth() - 1; i >= 0; --i)
- operator[](i).inset().setStatus(*this, InsetBase::Open);
}
}
// 'clever' UI hack: only erase large items if previously slected
- if (pos() != lastpos() && inset().nargs() > 0) {
+ if (pos() != lastpos() && nextAtom()->nargs() > 0) {
resetAnchor();
selection() = true;
++pos();
return result;
}
-#ifdef WITH_WARNINGS
-#warning and mathed?
-#endif
+ if (inMathed())
+ return lyx::cap::grabSelection(*this);
+
return string();
}