#include <config.h>
#include "BufferView.h"
+#include "bufferview_funcs.h"
#include "buffer.h"
#include "cursor.h"
#include "coordcache.h"
#include "mathed/InsetMathScript.h"
#include "mathed/MathMacroTable.h"
+#include "frontends/Selection.h"
+
#include "support/limited_stack.h"
#include <boost/assert.hpp>
}
-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());
}
resetAnchor();
selection() = sel;
+ theSelection().haveSelection(sel);
return true;
}
autocorrect() = false;
if (selection()) {
- cap::selDel(*this);
+ cap::eraseSelection(*this);
return true;
}
return true;
if (selection()) {
- cap::selDel(*this);
+ cap::eraseSelection(*this);
return true;
}