On Tue, 2006-03-07 at 09:02 +0200, Martin Vermeer wrote:
> On Mon, 2006-03-06 at 23:27 +0100, Jean-Marc Lasgouttes wrote:
> > >>>>> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes:

...

> add sliver for clicking inbetween () () in math                               
>       martin  joost
> fix to x2pos in math_data to not skip over inset at end of cell               
>       martin  joost

...

> I propose also to check in the "sliver" and "x2pos" fixes; will post
> them again for review first.

Here they are. The first chunk allows the cursor to be positioned to the
right of the last nestinset in a cell:

[ [nest1][nest2]...[nestn]| ]
                          --
                          ^ here

The second chunk allows positioning inbetween two abutting nestinsets,
rather than inside either/or (test with [(a)(b)] ):

[ ...[nesti]|[nesti+1]...]
             --
              ^ here (inert sliver)

Please review (what little there is :). Joost's Schrödinger equation is
a  good test object.

- Martin

Index: math_data.C
===================================================================
--- math_data.C	(revision 13302)
+++ math_data.C	(working copy)
@@ -393,7 +393,7 @@
 	 *   the right one.
 	 * See bug 1918 for details.    
 	 **/
-	if (it != begin()
+	if (it != begin() && currx >= targetx
 	    && ((*boost::prior(it))->asNestInset()
 		|| abs(lastx - targetx) < abs(currx - targetx))) {
 		--it;
Index: math_nestinset.C
===================================================================
--- math_nestinset.C	(revision 13302)
+++ math_nestinset.C	(working copy)
@@ -1023,7 +1023,9 @@
 	if (dist_min == 0) {
 		// hit inside cell
 		for (pos_type i = 0, n = ar.size(); i < n; ++i)
-			if (ar[i]->covers(x, y))
+			// Provide an extra inert sliver to get in-between:
+			if (ar[i]->covers(x, y) 
+				&& x >= ar[i]->xo() + 3)
 				return ar[i].nucleus()->editXY(cur, x, y);
 	}
 	return this;

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to