[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master f6e6c17: Fix posn-at-point with line-number display
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master f6e6c17: Fix posn-at-point with line-number display and display properties |
Date: |
Wed, 24 Apr 2019 08:28:02 -0400 (EDT) |
branch: master
commit f6e6c1744be5620ce97c8429a161ae5cf733a949
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Fix posn-at-point with line-number display and display properties
* src/xdisp.c (pos_visible_p): Account for line-number display
width when CHARPOS is covered by display property that begins
at the 2nd display element of a screen line. (Bug#35404)
---
src/xdisp.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/xdisp.c b/src/xdisp.c
index a88fc69..825b74d 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1623,6 +1623,12 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int
*x, int *y,
set_iterator_to_next (&it3, false);
}
top_x = it3.current_x - it3.pixel_width;
+ /* Account for line-number display, if IT3 still
+ didn't. This can happen if START - 1 is the
+ first character on its display line. */
+ if (!it3.line_number_produced_p
+ && it.line_number_produced_p)
+ top_x += it.lnum_pixel_width;
/* Normally, we would exit the above loop because we
found the display element whose character
position is CHARPOS. For the contingency that we
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master f6e6c17: Fix posn-at-point with line-number display and display properties,
Eli Zaretskii <=