#include "insets/insettext.h"
-#include "mathed/math_cursor.h"
-
#include "support/tostr.h"
-
#include "support/std_sstream.h"
using lyx::support::bformat;
// Returns the current font and depth as a message.
string const currentState(BufferView * bv)
{
+ ostringstream state;
+
if (!bv->available())
return string();
- if (mathcursor)
- return mathcursor->info(*bv);
-
- ostringstream state;
+ if (bv->cursor().inMathed()) {
+ bv->cursor().info(state);
+ return state.str();
+ }
LyXText * text = bv->getLyXText();
Buffer * buffer = bv->buffer();
// deletes a selection during an insertion
void replaceSelection(LyXText * text)
{
- if (text->bv()->selection().set()) {
+ if (text->bv()->cursor().selection()) {
text->cutSelection(true, false);
text->bv()->update();
}