diff options
| author | Eli Zaretskii | 2015-07-01 19:27:13 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2015-07-01 19:27:13 +0300 |
| commit | 4c66103fb3ee13c39ba53659f00b2c569307f3e8 (patch) | |
| tree | 3a395ab59d132a8761221dcca3edcd36cb8fe7d7 /src | |
| parent | 87464d637a698f65e2bbdd18fa4a464f804cc5fc (diff) | |
| download | emacs-4c66103fb3ee13c39ba53659f00b2c569307f3e8.tar.gz emacs-4c66103fb3ee13c39ba53659f00b2c569307f3e8.zip | |
Fix value of posn-at-pont in R2L lines
* src/keyboard.c (Fposn_at_x_y, Fposn_at_point): Allow X pixel
coordinate of -1, for a newline in a right-to-left line that
overflowed into the left fringe.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 8ea7b53a784..c5a392f862d 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -10795,7 +10795,11 @@ The return value is similar to a mouse click position: | |||
| 10795 | The `posn-' functions access elements of such lists. */) | 10795 | The `posn-' functions access elements of such lists. */) |
| 10796 | (Lisp_Object x, Lisp_Object y, Lisp_Object frame_or_window, Lisp_Object whole) | 10796 | (Lisp_Object x, Lisp_Object y, Lisp_Object frame_or_window, Lisp_Object whole) |
| 10797 | { | 10797 | { |
| 10798 | CHECK_NATNUM (x); | 10798 | CHECK_NUMBER (x); |
| 10799 | /* We allow X of -1, for the newline in a R2L line that overflowed | ||
| 10800 | into the left fringe. */ | ||
| 10801 | if (XINT (x) != -1) | ||
| 10802 | CHECK_NATNUM (x); | ||
| 10799 | CHECK_NATNUM (y); | 10803 | CHECK_NATNUM (y); |
| 10800 | 10804 | ||
| 10801 | if (NILP (frame_or_window)) | 10805 | if (NILP (frame_or_window)) |
| @@ -10843,8 +10847,9 @@ The `posn-' functions access elements of such lists. */) | |||
| 10843 | Lisp_Object x = XCAR (tem); | 10847 | Lisp_Object x = XCAR (tem); |
| 10844 | Lisp_Object y = XCAR (XCDR (tem)); | 10848 | Lisp_Object y = XCAR (XCDR (tem)); |
| 10845 | 10849 | ||
| 10846 | /* Point invisible due to hscrolling? */ | 10850 | /* Point invisible due to hscrolling? X can be -1 when a |
| 10847 | if (XINT (x) < 0) | 10851 | newline in a R2L line overflows into the left fringe. */ |
| 10852 | if (XINT (x) < -1) | ||
| 10848 | return Qnil; | 10853 | return Qnil; |
| 10849 | tem = Fposn_at_x_y (x, y, window, Qnil); | 10854 | tem = Fposn_at_x_y (x, y, window, Qnil); |
| 10850 | } | 10855 | } |