[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 4c66103: Fix value of posn-at-pont in R2L lines
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master 4c66103: Fix value of posn-at-pont in R2L lines |
Date: |
Wed, 01 Jul 2015 16:28:12 +0000 |
branch: master
commit 4c66103fb3ee13c39ba53659f00b2c569307f3e8
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
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.
---
src/keyboard.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/keyboard.c b/src/keyboard.c
index 8ea7b53..c5a392f 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -10795,7 +10795,11 @@ The return value is similar to a mouse click position:
The `posn-' functions access elements of such lists. */)
(Lisp_Object x, Lisp_Object y, Lisp_Object frame_or_window, Lisp_Object
whole)
{
- CHECK_NATNUM (x);
+ CHECK_NUMBER (x);
+ /* We allow X of -1, for the newline in a R2L line that overflowed
+ into the left fringe. */
+ if (XINT (x) != -1)
+ CHECK_NATNUM (x);
CHECK_NATNUM (y);
if (NILP (frame_or_window))
@@ -10843,8 +10847,9 @@ The `posn-' functions access elements of such lists.
*/)
Lisp_Object x = XCAR (tem);
Lisp_Object y = XCAR (XCDR (tem));
- /* Point invisible due to hscrolling? */
- if (XINT (x) < 0)
+ /* Point invisible due to hscrolling? X can be -1 when a
+ newline in a R2L line overflows into the left fringe. */
+ if (XINT (x) < -1)
return Qnil;
tem = Fposn_at_x_y (x, y, window, Qnil);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 4c66103: Fix value of posn-at-pont in R2L lines,
Eli Zaretskii <=