From ae61d7a57d5b722c9ca1399ac377c60de26861e2 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 10 Oct 2021 17:14:55 +0300 Subject: [PATCH] Fix point positioning on mouse clicks with non-zero line-height * src/xdisp.c (move_it_to): After passing a newline, reset it->override_ascent, like 'display_line' does (in 'append_space_for_newline'). (Bug#51111) --- src/xdisp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xdisp.c b/src/xdisp.c index 9ddf0dd54b5..d8aff5084c4 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -10073,6 +10073,8 @@ move_it_to (struct it *it, ptrdiff_t to_charpos, int to_x, int to_y, int to_vpos case MOVE_NEWLINE_OR_CR: max_current_x = max (it->current_x, max_current_x); + if (!IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)) + it->override_ascent = -1; set_iterator_to_next (it, true); it->continuation_lines_width = 0; break; -- 2.39.2