unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Friday regression: double-click no longer selects word
@ 2011-01-29 17:10 Jim Meyering
  2011-01-29 18:21 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Jim Meyering @ 2011-01-29 17:10 UTC (permalink / raw)
  To: Emacs development discussions

I built with the latest from git and noticed that
double clicking on a word no longer selects it.
It was introduced by this commit:

    Fix text pos part of lispy positions for right fringe clicks (Bug#7839).

    * src/keyboard.c (make_lispy_position): For clicks on right fringe or
    margin, compute text position using the X coordinate relative to
    the left of the text area (Bug#7839).

diff --git a/src/keyboard.c b/src/keyboard.c
index 8ae6eb9..7a5185d 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -5153,8 +5153,12 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y,
 	  int width2, height2;
 	  /* The pixel X coordinate passed to buffer_posn_from_coords
 	     is the X coordinate relative to the text area for
-	     text-area clicks, zero otherwise.  */
-	  int x2 = (part == ON_TEXT) ? xret : 0;
+	     text-area and right-margin clicks, zero otherwise.  */
+	  int x2
+	    = (part == ON_TEXT) ? x2
+	    : (part == ON_RIGHT_FRINGE || part == ON_RIGHT_MARGIN)
+	    ? (XINT (x) - window_box_left (w, TEXT_AREA))
+	    : 0;
 	  int y2 = wy;

 	  string2 = buffer_posn_from_coords (w, &x2, &y2, &p,
------------------------------------------------------------

Obviously, when defining "x2", we cannot use "x2", because
it is undefined, so I presume the intent was to use "xret",
as in the preceding revision.

This patch solves my problem:

From 2526653b57ca7ea2137487c0d17bf649210238ff Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Sat, 29 Jan 2011 18:06:09 +0100
Subject: [PATCH] * keyboard.c (make_lispy_position): Correct typo in previous change.

---
 src/ChangeLog  |    4 ++++
 src/keyboard.c |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/ChangeLog b/src/ChangeLog
index b3df85d..8d244d3 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2011-01-29  Jim Meyering  <meyering@redhat.com>
+
+	* keyboard.c (make_lispy_position): Correct typo in previous change.
+
 2011-01-29  Jan Djärv  <jan.h.d@swipnet.se>

 	* nsselect.m (ns_string_from_pasteboard): Get length of string
diff --git a/src/keyboard.c b/src/keyboard.c
index 7a5185d..3283fd4 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -5155,7 +5155,7 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y,
 	     is the X coordinate relative to the text area for
 	     text-area and right-margin clicks, zero otherwise.  */
 	  int x2
-	    = (part == ON_TEXT) ? x2
+	    = (part == ON_TEXT) ? xret
 	    : (part == ON_RIGHT_FRINGE || part == ON_RIGHT_MARGIN)
 	    ? (XINT (x) - window_box_left (w, TEXT_AREA))
 	    : 0;
--
1.7.3.5.44.g960a



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: Friday regression: double-click no longer selects word
  2011-01-29 17:10 Friday regression: double-click no longer selects word Jim Meyering
@ 2011-01-29 18:21 ` Eli Zaretskii
  2011-01-30 16:06   ` Jim Meyering
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2011-01-29 18:21 UTC (permalink / raw)
  To: Jim Meyering; +Cc: emacs-devel

> From: Jim Meyering <jim@meyering.net>
> Date: Sat, 29 Jan 2011 18:10:30 +0100
> 
> I built with the latest from git and noticed that
> double clicking on a word no longer selects it.
> It was introduced by this commit:
> 
>     Fix text pos part of lispy positions for right fringe clicks (Bug#7839).
> 
>     * src/keyboard.c (make_lispy_position): For clicks on right fringe or
>     margin, compute text position using the X coordinate relative to
>     the left of the text area (Bug#7839).

This was fixed by Chong 3 hours ago.  You are using the git mirror,
which is not yet synchronized with that revision.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Friday regression: double-click no longer selects word
  2011-01-29 18:21 ` Eli Zaretskii
@ 2011-01-30 16:06   ` Jim Meyering
  2011-01-30 17:48     ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Jim Meyering @ 2011-01-30 16:06 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii wrote:
>> From: Jim Meyering <jim@meyering.net>
>> Date: Sat, 29 Jan 2011 18:10:30 +0100
>>
>> I built with the latest from git and noticed that
>> double clicking on a word no longer selects it.
>> It was introduced by this commit:
>>
>>     Fix text pos part of lispy positions for right fringe clicks (Bug#7839).
>>
>>     * src/keyboard.c (make_lispy_position): For clicks on right fringe or
>>     margin, compute text position using the X coordinate relative to
>>     the left of the text area (Bug#7839).
>
> This was fixed by Chong 3 hours ago.  You are using the git mirror,
> which is not yet synchronized with that revision.

Thanks.
I didn't realize the git mirror could be so far out of date.
I will be using bzr more, now.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Friday regression: double-click no longer selects word
  2011-01-30 16:06   ` Jim Meyering
@ 2011-01-30 17:48     ` Eli Zaretskii
  2011-01-30 18:11       ` Thierry Volpiatto
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2011-01-30 17:48 UTC (permalink / raw)
  To: Jim Meyering; +Cc: emacs-devel

> From: Jim Meyering <jim@meyering.net>
> Cc: emacs-devel@gnu.org
> Date: Sun, 30 Jan 2011 17:06:11 +0100
> 
> I didn't realize the git mirror could be so far out of date.

My impression was that the mirror gets updated once a day, but I'm not
entirely sure about that.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Friday regression: double-click no longer selects word
  2011-01-30 17:48     ` Eli Zaretskii
@ 2011-01-30 18:11       ` Thierry Volpiatto
  0 siblings, 0 replies; 5+ messages in thread
From: Thierry Volpiatto @ 2011-01-30 18:11 UTC (permalink / raw)
  To: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Jim Meyering <jim@meyering.net>
>> Cc: emacs-devel@gnu.org
>> Date: Sun, 30 Jan 2011 17:06:11 +0100
>> 
>> I didn't realize the git mirror could be so far out of date.
>
> My impression was that the mirror gets updated once a day, but I'm not
> entirely sure about that.
It is, at least the one on repo.or.cz, don't know for savannah.


-- 
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-01-30 18:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-29 17:10 Friday regression: double-click no longer selects word Jim Meyering
2011-01-29 18:21 ` Eli Zaretskii
2011-01-30 16:06   ` Jim Meyering
2011-01-30 17:48     ` Eli Zaretskii
2011-01-30 18:11       ` Thierry Volpiatto

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).