Unset the last visited command output position

This commit is contained in:
pagedown 2021-11-17 23:00:27 +08:00
parent 37b6677608
commit fe075ea795
No known key found for this signature in database
GPG Key ID: E921CF18AC8FF6EB

View File

@ -1269,7 +1269,10 @@ screen_cursor_to_column(Screen *self, unsigned int column) {
linebuf_init_line(self->linebuf, bottom); \ linebuf_init_line(self->linebuf, bottom); \
historybuf_add_line(self->historybuf, self->linebuf->line, &self->as_ansi_buf); \ historybuf_add_line(self->historybuf, self->linebuf->line, &self->as_ansi_buf); \
self->history_line_added_count++; \ self->history_line_added_count++; \
if (self->last_visited_prompt.is_set && self->last_visited_prompt.scrolled_by <= self->historybuf->count) self->last_visited_prompt.scrolled_by++; \ if (self->last_visited_prompt.is_set) { \
if (self->last_visited_prompt.scrolled_by < self->historybuf->count) self->last_visited_prompt.scrolled_by++; \
else self->last_visited_prompt.is_set = false; \
} \
} \ } \
linebuf_clear_line(self->linebuf, bottom, true); \ linebuf_clear_line(self->linebuf, bottom, true); \
self->is_dirty = true; \ self->is_dirty = true; \