summaryrefslogtreecommitdiff
path: root/src/xdisp.c
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2020-07-07 07:50:39 -0700
committerGlenn Morris <rgm@gnu.org>2020-07-07 07:50:39 -0700
commit3b36b38713aefb3aba40b3c094246782e8893f80 (patch)
tree07fa2065252c6cfbe9dc266cfd043071921e321f /src/xdisp.c
parent6b80ff3c465f87a31ccaaf41b2b521075f43632d (diff)
parent59e768d64ad97782249fda9e53b6adc94c6d0130 (diff)
downloademacs-3b36b38713aefb3aba40b3c094246782e8893f80.tar.gz
Merge from origin/emacs-27
59e768d64a Fix undefined behavior in json.c (Bug#42113) cce00bef03 Fix ACTION argument of 'display-buffer' call in gud.el 0121db2702 * src/keyboard.c (Fclear_this_command_keys): Doc fix. b9abf5ceb2 Improve do string of 'man' b87fc938a0 ; * src/xdisp.c (pos_visible_p): Yet another minor fix for...
Diffstat (limited to 'src/xdisp.c')
-rw-r--r--src/xdisp.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index e454fd7b83f..92afcccd388 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1872,10 +1872,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