Skip to content

Commit fe075ea

Browse files
committed
Unset the last visited command output position
1 parent 37b6677 commit fe075ea

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

kitty/screen.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1269,7 +1269,10 @@ screen_cursor_to_column(Screen *self, unsigned int column) {
12691269
linebuf_init_line(self->linebuf, bottom); \
12701270
historybuf_add_line(self->historybuf, self->linebuf->line, &self->as_ansi_buf); \
12711271
self->history_line_added_count++; \
1272-
if (self->last_visited_prompt.is_set && self->last_visited_prompt.scrolled_by <= self->historybuf->count) self->last_visited_prompt.scrolled_by++; \
1272+
if (self->last_visited_prompt.is_set) { \
1273+
if (self->last_visited_prompt.scrolled_by < self->historybuf->count) self->last_visited_prompt.scrolled_by++; \
1274+
else self->last_visited_prompt.is_set = false; \
1275+
} \
12731276
} \
12741277
linebuf_clear_line(self->linebuf, bottom, true); \
12751278
self->is_dirty = true; \

0 commit comments

Comments
 (0)