diff options
| author | Eli Zaretskii | 2016-10-29 17:39:54 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2016-10-29 17:39:54 +0300 |
| commit | 966b73b3163416adf09bcff7418ecc9fa5a554c9 (patch) | |
| tree | fb8d4c66b2e0f4627e4b4b4be33b0be0d5b2edb6 /src | |
| parent | aaa3a93e500ca189be1e8433ca2630ce2c86aa06 (diff) | |
| download | emacs-966b73b3163416adf09bcff7418ecc9fa5a554c9.tar.gz emacs-966b73b3163416adf09bcff7418ecc9fa5a554c9.zip | |
Avoid errors in posn-at-point for large images
* src/keyboard.c (Fposn_at_point): If pos-visible-in-window-p
returns a 6-member list for a partially visible glyph, pass the
sum of Y and RTOP to posn-at-x-y, since that's where the visible
portion of that glyph begins on display. (Bug#24804) (Bug#21832)
(Bug#23809)
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index bb411e77823..65938a5eb56 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -10790,11 +10790,19 @@ The `posn-' functions access elements of such lists. */) | |||
| 10790 | { | 10790 | { |
| 10791 | Lisp_Object x = XCAR (tem); | 10791 | Lisp_Object x = XCAR (tem); |
| 10792 | Lisp_Object y = XCAR (XCDR (tem)); | 10792 | Lisp_Object y = XCAR (XCDR (tem)); |
| 10793 | Lisp_Object aux_info = XCDR (XCDR (tem)); | ||
| 10794 | int y_coord = XINT (y); | ||
| 10793 | 10795 | ||
| 10794 | /* Point invisible due to hscrolling? X can be -1 when a | 10796 | /* Point invisible due to hscrolling? X can be -1 when a |
| 10795 | newline in a R2L line overflows into the left fringe. */ | 10797 | newline in a R2L line overflows into the left fringe. */ |
| 10796 | if (XINT (x) < -1) | 10798 | if (XINT (x) < -1) |
| 10797 | return Qnil; | 10799 | return Qnil; |
| 10800 | if (!NILP (aux_info) && y_coord < 0) | ||
| 10801 | { | ||
| 10802 | int rtop = XINT (XCAR (aux_info)); | ||
| 10803 | |||
| 10804 | y = make_number (y_coord + rtop); | ||
| 10805 | } | ||
| 10798 | tem = Fposn_at_x_y (x, y, window, Qnil); | 10806 | tem = Fposn_at_x_y (x, y, window, Qnil); |
| 10799 | } | 10807 | } |
| 10800 | 10808 | ||