Update the last visited command output position after unscrolling

This commit is contained in:
pagedown 2021-11-28 21:59:58 +08:00
parent 28d89bdd53
commit 9c326397d0
No known key found for this signature in database
GPG key ID: E921CF18AC8FF6EB

View file

@ -278,6 +278,11 @@ index_selection(const Screen *self, Selections *selections, bool up) {
if (self->overlay_line.is_active) deactivate_overlay_line(self); \
linebuf_reverse_index(self->linebuf, top, bottom); \
linebuf_clear_line(self->linebuf, top, true); \
if (self->linebuf == self->main_linebuf && self->last_visited_prompt.is_set) { \
if (self->last_visited_prompt.scrolled_by > 0) self->last_visited_prompt.scrolled_by--; \
else if(self->last_visited_prompt.y < self->lines - 1) self->last_visited_prompt.y++; \
else self->last_visited_prompt.is_set = false; \
} \
INDEX_GRAPHICS(1) \
self->is_dirty = true; \
index_selection(self, &self->selections, false);