From c0f5170fc35132281c530fc53ff6e83cff82dcdc Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 30 Mar 2025 20:27:11 +0530 Subject: [PATCH] Fix ranged_line_is_continued depending on scrolled_by --- kitty/screen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kitty/screen.c b/kitty/screen.c index 5c57140b6..bb35e6e54 100644 --- a/kitty/screen.c +++ b/kitty/screen.c @@ -782,7 +782,8 @@ static bool range_line_is_continued(Screen *self, int y) { if (!(-(int)self->historybuf->count <= y && y < (int)self->lines)) return false; if (y < 0) return historybuf_is_line_continued(self->historybuf, -(y + 1)); - return visual_line_is_continued(self, y); + if (y) return linebuf_is_line_continued(self->linebuf, y); + return self->linebuf == self->main_linebuf ? history_buf_endswith_wrap(self->historybuf) : false; } static void