]> git.lyx.org Git - features.git/commitdiff
Avoid markers for macros without arguments
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 23 Jan 2017 09:14:20 +0000 (10:14 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 23 Jan 2017 09:14:20 +0000 (10:14 +0100)
An example was the \neq macro, which exhibited white markers when selecting.

src/mathed/MathMacro.cpp

index bfa841dbe9ab57d90459e0e16922283ed2be5c8e..3502d1dfc50091378b0e24602e5f39f829d4f9ce 100644 (file)
@@ -313,7 +313,7 @@ bool MathMacro::addToMathRow(MathRow & mrow, MetricsInfo & mi) const
        MathRow::Element e_beg(mi, MathRow::BEG_MACRO);
        e_beg.inset = this;
        e_beg.macro = this;
-       e_beg.marker = d->nesting_ == 1 ? marker() : NO_MARKER;
+       e_beg.marker = (d->nesting_ == 1 && nargs()) ? marker() : NO_MARKER;
        mrow.push_back(e_beg);
 
        d->macro_->lock();