GNOME Bugzilla – Bug 710488
Incorrect scrollbar position after restricted scrolling
Last modified: 2014-04-27 07:45:47 UTC
Produce at least a screenful of text so that the scrollbar is active. Then enable restricting scrolling, with the upper bound being the topmost row, e.g. echo -e '\e[1;15r' Produce more output so that the cursor hits the boundary at the 15th row and the content starts scrolling. The scrollbar starts wandering upwards, though it should stay at the bottom. When you try to scroll by Shift+PageUp or by dragging the scrollbar, suddenly everything jumps back to normal.
Created attachment 257683 [details] [review] Fix The out-of-sync behavior between the scrollbar and the actual visual position is caused by directly altering scroll_delta, rather than via vte_terminal_queue_adjustment_value_changed(). This omits calling the desired gtk update hooks (via the update timeout). I think the correct behavior is not to update the scroll_delta here. If the scrollbar is snapped to the bottom, it will remain snapped there. If it's anywhere else, the desired behavior IMO is to keep the currently visible part on the screen, just as in the non-restricted scrolling case.
Fixed on vte-0-36.
*** Bug 537801 has been marked as a duplicate of this bug. ***