Comment 10 for bug 378361

Revision history for this message
In , Josh (josh-redhat-bugs) wrote :

Created attachment 339613
[vte] ensure that scroll_delta is always adjusted

When gnome-terminal's height is reduced, the active tab's terminal gets
a vte_terminal_size_allocate() call, which queues an adjustment to the
scroll_delta based on visible_rows to ensure that the scrollback moves
correctly.

However, when you then switch to a different tab, that terminal gets a
vte_terminal_set_size() first, which will update terminal->row_count
with the new height. Only after it's visible does it get
vte_terminal_size_allocate(), and there the computation of visible_rows
thinks that there's no reduction (since terminal->row_count already
matches the new height), so it doesn't compute the new scroll_delta.

This patch moves the scroll_delta computation into set_size so it is
always kept current.