diff options
| author | Chong Yidong | 2011-01-28 15:30:38 -0500 |
|---|---|---|
| committer | Chong Yidong | 2011-01-28 15:30:38 -0500 |
| commit | 6b91861333edd51848aa927c9b22d4ef431c2d01 (patch) | |
| tree | 70f23a7cc24f5e3c3a2267d38e1e3402aab5b839 /src | |
| parent | 01c63f4ce4a85d3429dc56b72fdb8514dea8874d (diff) | |
| download | emacs-6b91861333edd51848aa927c9b22d4ef431c2d01.tar.gz emacs-6b91861333edd51848aa927c9b22d4ef431c2d01.zip | |
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).
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/keyboard.c | 8 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 5af18f38877..e4eb78f7f01 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2011-01-28 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * keyboard.c (make_lispy_position): For clicks on right fringe or | ||
| 4 | margin, compute text position using the X coordinate relative to | ||
| 5 | the left of the text area (Bug#7839). | ||
| 6 | |||
| 1 | 2011-01-28 Kenichi Handa <handa@m17n.org> | 7 | 2011-01-28 Kenichi Handa <handa@m17n.org> |
| 2 | 8 | ||
| 3 | * ftfont.c (ftfont_spec_pattern): Check each extra property | 9 | * ftfont.c (ftfont_spec_pattern): Check each extra property |
diff --git a/src/keyboard.c b/src/keyboard.c index 8ae6eb9b29a..7a5185d43da 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, | |||
| 5153 | int width2, height2; | 5153 | int width2, height2; |
| 5154 | /* The pixel X coordinate passed to buffer_posn_from_coords | 5154 | /* The pixel X coordinate passed to buffer_posn_from_coords |
| 5155 | is the X coordinate relative to the text area for | 5155 | is the X coordinate relative to the text area for |
| 5156 | text-area clicks, zero otherwise. */ | 5156 | text-area and right-margin clicks, zero otherwise. */ |
| 5157 | int x2 = (part == ON_TEXT) ? xret : 0; | 5157 | int x2 |
| 5158 | = (part == ON_TEXT) ? x2 | ||
| 5159 | : (part == ON_RIGHT_FRINGE || part == ON_RIGHT_MARGIN) | ||
| 5160 | ? (XINT (x) - window_box_left (w, TEXT_AREA)) | ||
| 5161 | : 0; | ||
| 5158 | int y2 = wy; | 5162 | int y2 = wy; |
| 5159 | 5163 | ||
| 5160 | string2 = buffer_posn_from_coords (w, &x2, &y2, &p, | 5164 | string2 = buffer_posn_from_coords (w, &x2, &y2, &p, |