Make ring contain only onscreen contents
@egmontkob
Submitted by Egmont Koblinger Link to original bug (#748492)
Description
Currently the ring contains data for 2^N-1 lines (for some N).
Even if we stick to doubling and never freeing the malloced area (for which there's not much reason, since it only happens on resize which is an expensive operation anyways), I think we should only use it for the onscreen data (potentially leaving up to half of the allocated memory unused, who cares).
Instead, every row that leaves the visible part should be immediately sent to the stream.
This would simplify the code and make it robust against potential bugs that only occur at certain window heights.
In particular, the fix to bug 748484 could become way simpler. _vte_ring_reset_streams() wouldn't need to take a "position" parameter and we wouldn't need to move forward with row_stream's head, it could stay the same. In turn, the whole concept of resetting the file stream (or boa or snake) would be gone, it'd be replaced by a special case of advance_tail (where the new tail is the same as the current head).
Version: git master