From 1c229d939b09b6725824ace1c510739a1910ac87 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 14 Feb 2021 22:11:05 +0200 Subject: [PATCH] * src/xdisp.c (move_it_to): Fix last change. (Bug#46316) --- src/xdisp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xdisp.c b/src/xdisp.c index a1956824214..f86d3527b3d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -10051,7 +10051,8 @@ move_it_to (struct it *it, ptrdiff_t to_charpos, int to_x, int to_y, int to_vpos if ((op & MOVE_TO_POS) != 0 && (IT_CHARPOS (*it) > to_charpos || (IT_CHARPOS (*it) == to_charpos - && to_charpos == ZV))) + && to_charpos == ZV + && FETCH_BYTE (ZV_BYTE - 1) != '\n'))) { reached = 9; goto out; -- 2.39.2