From: Eli Zaretskii Date: Fri, 26 Jun 2020 19:33:44 +0000 (+0300) Subject: ; * src/xdisp.c (pos_visible_p): Yet another minor fix for bug#42039. X-Git-Tag: emacs-27.1-rc1~53 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b87fc938a01f8b5d7204568caffdaae781cfbcb0;p=emacs.git ; * src/xdisp.c (pos_visible_p): Yet another minor fix for bug#42039. --- 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, /* Account for line-number display, if IT3 still didn't. This can happen if START - 1 is the first or the last character on its display line. */ - if (it3.lnum_pixel_width > 0) - top_x += it3.lnum_pixel_width; - else if (it.line_number_produced_p) - top_x += it.lnum_pixel_width; + if (!it3.line_number_produced_p) + { + if (it3.lnum_pixel_width > 0) + top_x += it3.lnum_pixel_width; + else if (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