it.top().pos() = 0;
DocIterator et = c;
et.top().pos() = et.top().asMathInset()->cell(et.top().idx()).size();
- for (int i = 0; ; ++i) {
+ for (size_t i = 0; ; ++i) {
int xo;
int yo;
it.inset().cursorPos(it.top(), c.boundary() && ((i+1) == it.depth()), xo, yo);
// FIXME: bit more work needed to get 'from' and 'to' right.
pit_type from = cur.bottom().pit();
- pit_type to = cur.bottom().pit();
+ //pit_type to = cur.bottom().pit();
//lyxerr << "Pit start: " << from << endl;
//lyxerr << "bruteFind3: x: " << x << " y: " << y
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();
}