From xemacs-m  Mon Jun  9 18:44:01 1997
Received: from crystal.WonderWorks.COM (crystal.WonderWorks.com [192.203.206.1])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id SAA10643
	for <xemacs-beta@xemacs.org>; Mon, 9 Jun 1997 18:43:58 -0500 (CDT)
Received: by crystal.WonderWorks.COM 
	id QQctgg06482; Mon, 9 Jun 1997 19:44:00 -0400 (EDT)
Date: Mon, 9 Jun 1997 19:44:00 -0400 (EDT)
Message-Id: <QQctgg06482.199706092344@crystal.WonderWorks.COM>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="ey9cI4WxAH"
Content-Transfer-Encoding: 7bit
From: Kyle Jones <kyle_jones@wonderworks.com>
To: xemacs-beta@xemacs.org
Subject: [PATCH] 20.3-b4: fix for event-closest-point bug
X-Mailer: VM 6.33 under 20.3 XEmacs Lucid (beta4)
X-Face: /cA45WHG7jWq>(O3&Z57Y<"WsX5ddc,4c#w0F*zrV#=M
        0@~@,s;b,aMtR5Sqs"+nU.z^CSFQ9t`z2>W,S,]:[+2^
        Nbf6v4g>!&,7R4Ot4Wg{&tm=WX7P["9%a)_da48-^tGy
        ,qz]Z,Zz\{E.,]'EO+F)@$KtF&V


--ey9cI4WxAH
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

The bug is described in a somewhat jumbled fashion in the 
attached message.

Here's a patch.  Not recommended for the 19.15 official patches
as there may yet be Unintended Consequences.

Mon Jun  9 19:35:19 1997  Kyle Jones  <kyle_jones@wonderworks.com>

	* src/redisplay.c (pixel_to_glyph_translation):
	  Fixed off by one error in computation of closest
	  position when mouse is in the frame's right-side
	  border area.

--- 1.1	1997/06/09 16:58:31
+++ src/redisplay.c	1997/06/09 23:23:47
@@ -7573,7 +7573,7 @@
 		      else
 			*closest =
 			  Dynarr_atp (db->runes,
-				      Dynarr_length (db->runes) - 1)->bufpos;
+				      Dynarr_length (db->runes) - 2)->bufpos;
 		    }
 
 		  if (dl->modeline)



--ey9cI4WxAH
Content-Type: message/rfc822
Content-Transfer-Encoding: 7bit

Article: 14980 of comp.emacs.xemacs
x-gateway: relay6.UU.NET from xemacs to comp.emacs.xemacs; Wed, 14 May 1997 16:09:19 EDT
Message-ID: <9705141947.AA29890@portnoy.MIT.EDU>
Path: news.wonderworks.com!uunet!in1.uu.net!206.154.70.8!news.webspan.net!newsfeeds.sol.net!europa.clark.net!feed1.news.erols.com!howland.erols.net!newsfeed.internetmci.com!in2.uu.net!192.48.96.16!wendy-fate.uu.net!xemacs
Lines: 80
From: jered@MIT.EDU (Jered J Floyd)
Sender: xemacs-request@xemacs.org
Newsgroups: comp.emacs.xemacs
Subject: event-closest-point
Date: Wed, 14 May 1997 15:47:37 -0400

In XEmacs 20.2 [Lucid] (sparc-sun-solaris2.4) of Wed May 14 1997 on portnoy

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

This bug was reported by a local XEmacs user...I've verified that it
does occur with 20.2-release, and that the info page implies that this
shouldn't happen (or is at least overly vague.)

Please cc: myself (or xemacs@mit.edu) on replies. Thanks.

--Jered 
jered@mit.edu

From: David Bakhash <cadet@MIT.EDU>
Subject: event-closest-point
To: xemacs@MIT.EDU
Date: Wed, 14 May 1997 13:03:54 -0400
Received: from PACIFIC-CARRIER-ANNEX.MIT.EDU by po9.MIT.EDU (5.61/4.7) id AA17331; Wed, 14 May 97 13:03:55 EDT
Received: from BULGARIA.MIT.EDU by MIT.EDU with SMTP
	id AB16579; Wed, 14 May 97 12:03:13 EST
Message-Id: <9705141703.AB16579@MIT.EDU>
Lines: 22
Xref: portnoy.mit.edu mail.misc:15639

In XEmacs 20.1 [Lucid] (i586-unknown-linux2.0.18) of Wed Mar 12 1997 on cutter-john.mit.edu

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

Forgive me if I have reported this at some point in the way distant
past. I might have, but never saw any sign of acknowledgment...

the function `event-closest-point' doesn't work the way it aught to in
certain cases:

if you have this function:

(goto-char (event-closest-point event))  ; event is a mouse event

and the buffer is such that the lines wrap around (i.e. lines are
truncated), then if you run off the frame to the right, then the point
goes to the beginning of the next line--all the way on the left.  This
is unfortunate.  It really should be on the same line, as far to the
right as it can be.  Otherwise, it's not right.

dave

From: David Bakhash <cadet@MIT.EDU>
Subject: event-closest-point
To: xemacs@MIT.EDU
Date: Wed, 14 May 1997 13:33:03 -0400
Received: from PACIFIC-CARRIER-ANNEX.MIT.EDU by po9.MIT.EDU (5.61/4.7) id AA24872; Wed, 14 May 97 13:33:03 EDT
Received: from BULGARIA.MIT.EDU by MIT.EDU with SMTP
	id AA24074; Wed, 14 May 97 12:32:21 EST
Message-Id: <9705141732.AA24074@MIT.EDU>
Lines: 21
Xref: portnoy.mit.edu mail.misc:15649

In XEmacs 20.1 [Lucid] (i586-unknown-linux2.0.18) of Wed Mar 12 1997 on cutter-john.mit.edu

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

just to clarify that one a bit...
I *DID* read what the function was supposed to do (in the info docs) but
don't feel that it does that.  But even if the info docs were correct,
the actual effect is undesirable.  It kindof hurts strokes.el.  you'll
see if you:

1) load strokes.el in XEmacs running on an X display
   http://www.mit.edu/people/cadet/strokes.el

2) M-x strokes-mode

3) press middle-mouse-button and leave the frame to the right.  then you
   see the problem.  Please let me know if you're in a agreement with
   me.

dave


--ey9cI4WxAH--

