]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix point positioning on mouse clicks with non-zero line-height
authorEli Zaretskii <eliz@gnu.org>
Sun, 10 Oct 2021 14:14:55 +0000 (17:14 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sun, 10 Oct 2021 14:14:55 +0000 (17:14 +0300)
* 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

index 9ddf0dd54b58f8aa0e65199c33dfe70928a5eaba..d8aff5084c4373815ef2b0444e9d005ba196da41 100644 (file)
@@ -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;