On Wed, Jun 13, 2007 at 07:22:47AM +0200, Stefan Schimanski wrote: > > Am 12.06.2007 um 23:44 schrieb Andre Poenitz: > > >On Tue, Jun 12, 2007 at 09:14:44PM +0200, Stefan Schimanski wrote: > >> > >>Am 12.06.2007 um 14:47 schrieb Leuven, E.: > >> > >>>ctrl-n > >>>ctrl-m > >>>\neq > >>>arrow right (exit math) > >>>arrow left (enter math again) > >>> > >>>and i don't see the neq sign but \ = > >> > >>I can confirm that. Please make a bug report out of it. > > > >Seems like width computation assumes w >= 0 somewhere. > > > >Btw can anybody explain me how stuff like > > > > > > //BufferView & bv = *mi.base.bv; > > //Buffer const & buf = *bv.buffer(); > > for (size_t i = 0, n = size(); i != n; ++i) { > > MathAtom const & at = operator[](i); > >#if 0 > > MathMacro const * mac = at->asMacro(); > > if (mac && buf.hasMacro(mac->name())) { > > MacroData const & tmpl = buf.getMacro(mac->name()); > > int numargs = tmpl.numargs(); > > if (i + numargs > n) > > numargs = n - i - 1; > > lyxerr << "metrics:found macro: " << mac->name() > > << " numargs: " << numargs << endl; > > if (!isInside(bv.cursor(), *this, i + 1, i + numargs > > + 1)) { > > MathData args(begin() + i + 1, begin() + i + > > numargs + 1); > > MathData exp; > > tmpl.expand(args, exp); > > mac->setExpansion(exp, args); > > mac->metricsExpanded(mi, d); > > dim_.wid += mac->widthExpanded(); > > i += numargs; > > continue; > > } > > } > >#endif > > at->metrics(mi, d); > > > >can end up in MathData.cpp? > > This question I have asked myself so many times, but not only about > this piece of code. > Btw, two lines of the block above are by you ;-)
That was the global MathArray -> MathData renaming, no 'active' change. > >This is certainly not the bit bucket of the nation.... > > > >The whole business around rev 17836 and 17840 looks dubious at best. > > What are you talking about and what do those revisions have to do > with the code above? This code went in in 17840 (completel with '#if 0' and such). The lock message tells about reverting 17835 which did not change that part at all. "Revert to revision 17835: I applied the wrong tree!" But 17836 did, but that looks equally strange. > It would be helpful if you wrote what you don't like... I don't like big chunks of '#if 0''d code go in without good reason. > I am not a fan of riddles and I am not somebody who can read > other's thoughts. I stumbled across this when I tried to figure out what might cause the metrics computation of '\not' (used in e.g. \neq) go wrong. Andre'