#include <config.h>
#include "BufferView.h"
+#include "bufferview_funcs.h"
#include "buffer.h"
#include "cursor.h"
#include "coordcache.h"
}
-Row & LCursor::textRow()
-{
- BOOST_ASSERT(!paragraph().rows().empty());
- return paragraph().getRow(pos(), boundary());
-}
-
-
Row const & LCursor::textRow() const
{
- BOOST_ASSERT(!paragraph().rows().empty());
- return paragraph().getRow(pos(), boundary());
+ ParagraphMetrics const & pm = bv().parMetrics(text(), pit());
+ BOOST_ASSERT(!pm.rows().empty());
+ return pm.getRow(pos(), boundary());
}
operator[](i).inset().infoize(os);
os << " ";
}
- if (pos() != 0)
- prevInset()->infoize2(os);
+ if (pos() != 0) {
+ InsetBase const * inset = prevInset();
+ // prevInset() can return 0 in certain case.
+ if (inset)
+ prevInset()->infoize2(os);
+ }
// overwite old message
os << " ";
}
resetAnchor();
selection() = sel;
+ cap::saveSelection(*this);
return true;
}
#include "mathed/InsetMathScript.h"
#include "mathed/InsetMathUnknown.h"
#include "mathed/MathFactory.h"
-#include "mathed/MathMacroArgument.h"
#include "mathed/MathStream.h"
#include "mathed/MathSupport.h"
autocorrect() = false;
if (selection()) {
- cap::selDel(*this);
+ cap::eraseSelection(*this);
return true;
}
return true;
if (selection()) {
- cap::selDel(*this);
+ cap::eraseSelection(*this);
return true;
}