Image display: Fix displaying images taller than two screen heights not scrolling properly
Fixes #194
This commit is contained in:
parent
f16bf2a136
commit
07b70f8c95
@ -16,6 +16,9 @@ version 0.6.0 [future]
|
||||
|
||||
- Fix shift+up/down not rendering correct escape codes
|
||||
|
||||
- Image display: Fix displaying images taller than two screen heights not
|
||||
scrolling properly
|
||||
|
||||
|
||||
version 0.5.0 [2017-11-19]
|
||||
---------------------------
|
||||
|
||||
@ -436,7 +436,8 @@ screen_handle_graphics_command(Screen *self, const GraphicsCommand *cmd, const u
|
||||
if (response != NULL) write_to_child(self, response, strlen(response));
|
||||
if (x != self->cursor->x || y != self->cursor->y) {
|
||||
if (self->cursor->x >= self->columns) { self->cursor->x = 0; self->cursor->y++; }
|
||||
if (self->cursor->y > self->margin_bottom) { screen_scroll(self, self->cursor->y - self->margin_bottom); }
|
||||
if (self->cursor->y > self->margin_bottom) screen_scroll(self, self->cursor->y - self->margin_bottom);
|
||||
screen_ensure_bounds(self, false);
|
||||
}
|
||||
}
|
||||
// }}}
|
||||
@ -701,7 +702,6 @@ screen_index(Screen *self) {
|
||||
void
|
||||
screen_scroll(Screen *self, unsigned int count) {
|
||||
// Scroll the screen up by count lines, not moving the cursor
|
||||
count = MIN(self->lines, count);
|
||||
unsigned int top = self->margin_top, bottom = self->margin_bottom;
|
||||
while (count > 0) {
|
||||
count--;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user