aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2020-06-26 22:33:44 +0300
committerEli Zaretskii2020-06-26 22:33:44 +0300
commitb87fc938a01f8b5d7204568caffdaae781cfbcb0 (patch)
tree47512d35a3d45811a6e65d1e29d83a55ee8cfaa8
parent5280e118c07d738321f61b3f2bc3cd27a5ac8dbc (diff)
downloademacs-b87fc938a01f8b5d7204568caffdaae781cfbcb0.tar.gz
emacs-b87fc938a01f8b5d7204568caffdaae781cfbcb0.zip
; * src/xdisp.c (pos_visible_p): Yet another minor fix for bug#42039.
-rw-r--r--src/xdisp.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 2aff120bc80..269777a5b15 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1851,10 +1851,13 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
1851 /* Account for line-number display, if IT3 still 1851 /* Account for line-number display, if IT3 still
1852 didn't. This can happen if START - 1 is the 1852 didn't. This can happen if START - 1 is the
1853 first or the last character on its display line. */ 1853 first or the last character on its display line. */
1854 if (it3.lnum_pixel_width > 0) 1854 if (!it3.line_number_produced_p)
1855 top_x += it3.lnum_pixel_width; 1855 {
1856 else if (it.line_number_produced_p) 1856 if (it3.lnum_pixel_width > 0)
1857 top_x += it.lnum_pixel_width; 1857 top_x += it3.lnum_pixel_width;
1858 else if (it.line_number_produced_p)
1859 top_x += it.lnum_pixel_width;
1860 }
1858 /* Normally, we would exit the above loop because we 1861 /* Normally, we would exit the above loop because we
1859 found the display element whose character 1862 found the display element whose character
1860 position is CHARPOS. For the contingency that we 1863 position is CHARPOS. For the contingency that we