emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r103010: Fix text pos part of lispy p


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r103010: Fix text pos part of lispy positions for right fringe clicks (Bug#7839).
Date: Fri, 28 Jan 2011 15:30:38 -0500
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 103010
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Fri 2011-01-28 15:30:38 -0500
message:
  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).
modified:
  src/ChangeLog
  src/keyboard.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-01-28 12:31:39 +0000
+++ b/src/ChangeLog     2011-01-28 20:30:38 +0000
@@ -1,3 +1,9 @@
+2011-01-28  Chong Yidong  <address@hidden>
+
+       * 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).
+
 2011-01-28  Kenichi Handa  <address@hidden>
 
        * ftfont.c (ftfont_spec_pattern): Check each extra property

=== modified file 'src/keyboard.c'
--- a/src/keyboard.c    2011-01-26 08:36:39 +0000
+++ b/src/keyboard.c    2011-01-28 20:30:38 +0000
@@ -5153,8 +5153,12 @@
          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,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]