#include "FuncStatus.h"
#include "LyX.h"
#include "LyXRC.h"
+#include "MetricsInfo.h"
#include "OutputParams.h"
#include "Text.h"
#include "frontends/Painter.h"
#include "frontends/Selection.h"
-#include "support/lassert.h"
#include "support/debug.h"
+#include "support/docstream.h"
#include "support/gettext.h"
+#include "support/lassert.h"
#include "support/lstrings.h"
#include "support/textutils.h"
-#include "support/docstream.h"
#include <algorithm>
#include <sstream>
docstring const latex_name = name();
os << '\\' << latex_name;
for (size_t i = 0; i < nargs(); ++i) {
- os.pushRowEntry(TexRow::mathEntry(id(),i));
+ Changer dummy = os.changeRowEntry(TexRow::mathEntry(id(),i));
os << '{' << cell(i) << '}';
- os.popRowEntry();
}
if (nargs() == 0)
os.pendingSpace(true);
runparams.dryrun ? WriteStream::wsDryrun : WriteStream::wsDefault,
runparams.encoding);
wi.canBreakLine(os.canBreakLine());
- if (runparams.lastid != -1) {
- wi.pushRowEntry(os.texrow().textEntry(runparams.lastid,
- runparams.lastpos));
- write(wi);
- wi.popRowEntry();
- } else
- write(wi);
+ Changer dummy = wi.changeRowEntry(os.texrow().textEntry(runparams.lastid,
+ runparams.lastpos));
+ write(wi);
// Reset parbreak status after a math inset.
os.lastChar(0);
os.canBreakLine(wi.canBreakLine());
cur.selHandle(select);
// handle autocorrect:
- cur.autocorrect() = false;
- cur.message(_("Autocorrect Off ('!' to enter)"));
+ if (lyxrc.autocorrection_math && cur.autocorrect()) {
+ cur.autocorrect() = false;
+ cur.message(_("Autocorrect Off ('!' to enter)"));
+ }
// go up/down
bool up = act == LFUN_UP || act == LFUN_UP_SELECT;
}
case LFUN_MOUSE_DOUBLE:
- case LFUN_MOUSE_TRIPLE:
case LFUN_WORD_SELECT:
cur.pos() = 0;
+ cur.resetAnchor();
+ cur.selection(true);
+ cur.pos() = cur.lastpos();
+ cur.bv().cursor() = cur;
+ break;
+
+ case LFUN_MOUSE_TRIPLE:
cur.idx() = 0;
+ cur.pos() = 0;
cur.resetAnchor();
- cur.setSelection(true);
+ cur.selection(true);
cur.idx() = cur.lastidx();
cur.pos() = cur.lastpos();
cur.bv().cursor() = cur;
cur.noScreenUpdate();
else {
Cursor & bvcur = cur.bv().cursor();
- bvcur.setSelection(true);
+ bvcur.selection(true);
}
return;
}
// just clear selection on pressing the space bar
if (cur.selection() && c == ' ') {
- cur.setSelection(false);
+ cur.selection(false);
return true;
}
globals.push_back(from_ascii("\\sqrt"));
globals.push_back(from_ascii("\\root"));
globals.push_back(from_ascii("\\tabular"));
+ globals.push_back(from_ascii("\\sideset"));
globals.push_back(from_ascii("\\stackrel"));
globals.push_back(from_ascii("\\stackrelthree"));
globals.push_back(from_ascii("\\binom"));