void InsetMathNest::write(WriteStream & os) const
{
+ MathEnsurer ensurer(os, currentMode() == MATH_MODE);
ModeSpecifier specifier(os, currentMode(), lockedMode());
docstring const latex_name = name();
os << '\\' << latex_name;
wi.canBreakLine(os.canBreakLine());
write(wi);
os.canBreakLine(wi.canBreakLine());
- os.texrow().newlines(wi.line());
+
+ int lf = wi.line();
+ if (lf > 0 && runparams.lastid != -1) {
+ --lf;
+ os.texrow().newline();
+ os.texrow().start(runparams.lastid, runparams.lastpos);
+ }
+ os.texrow().newlines(lf);
}
bool InsetMathNest::setMouseHover(BufferView const * bv, bool mouse_hover)
+ const
{
mouse_hover_[bv] = mouse_hover;
return true;
{
//lyxerr << "## lfunMousePress: buttons: " << cmd.button() << endl;
BufferView & bv = cur.bv();
+ if (cmd.button() == mouse_button::button3) {
+ // Don't do anything if we right-click a
+ // selection, a context menu will popup.
+ if (bv.cursor().selection() && cur >= bv.cursor().selectionBegin()
+ && cur < bv.cursor().selectionEnd()) {
+ cur.noScreenUpdate();
+ return;
+ }
+ }
bool do_selection = cmd.button() == mouse_button::button1
&& cmd.argument() == "region-select";
bv.mouseSetCursor(cur, do_selection);