On Wed, 2005-09-28 at 14:24 +0100, Angus Leeming wrote: > >From the command line: > man patch > I did try to decipher it, honest. :p > I'm trying to install attachment 650 (http://bugzilla.lyx.org/attachment.cgi?id=650&action=view) as a patch, but am so far having no success. I've had to switch to lyx-devel/src/mathed to use the command: patch -p0 < ../../650.diff However, this throws up this error: [EMAIL PROTECTED] mathed]$ patch -p0 < ../../650.diff patching file math_nestinset.C Hunk #1 FAILED at 987. 1 out of 1 hunk FAILED -- saving rejects to file math_nestinset.C.rej
lyx-devel/src/mathed/math_nestinset.C.rej reads: *************** *** 987,1002 **** int idx_min = 0; int dist_min = 1000000; for (idx_type i = 0; i < nargs(); ++i) { - int d = cell(i).dist(x, y); - if (d < dist_min) { - dist_min = d; - idx_min = i; } } MathArray const & ar = cell(idx_min); cur.push(const_cast<MathNestInset&>(*this)); cur.idx() = idx_min; - cur.pos() = ar.x2pos(x - ar.xo()); lyxerr << "found cell : " << idx_min << " pos: " << cur.pos() << endl; if (dist_min == 0) { // hit inside cell --- 987,1008 ---- int idx_min = 0; int dist_min = 1000000; for (idx_type i = 0; i < nargs(); ++i) { + if (theCoords.getArrays().has(&cell(i))) { + int d = cell(i).dist(x, y); + if (d < dist_min) { + dist_min = d; + idx_min = i; + } } } MathArray const & ar = cell(idx_min); + pos_type pos = 0; + if (theCoords.getArrays().has(&ar)) { + pos = ar.x2pos(x - ar.xo()); + } cur.push(const_cast<MathNestInset&>(*this)); cur.idx() = idx_min; + cur.pos() = pos; lyxerr << "found cell : " << idx_min << " pos: " << cur.pos() << endl; if (dist_min == 0) { // hit inside cell I'm fairly confident I'm one of the skilled few who could have a problem with such a simple thing. On the bright side, I don't know C++ so it's not really preventing me helping the development. ;) I do apologise if I'm missing something blindingly obvious. I only wish I had an excuse. Thanks for the continued help, Dan