GNOME Bugzilla – Bug 676075
Incorrect scrollbar position after the "less" command.
Last modified: 2014-04-06 18:20:20 UTC
Created attachment 214063 [details] screenshot 0. Open gnome-terminal. 1. Fill the terminal with lines of texts (e.g. by using 'find /' and then interrupt). Note that the "current position" in the vertical scroll bar is at the bottom and this is correct. 2. Use the less command to read a text file (e.g. less /etc/fstab). 3. Press 'q' to quite the 'less' command. Expected: After 'less' exited and returned to the shell, the "current position" of the scroll bar should be at the bottom. What actually happened: After 'less' exited and returned to the shell, the "current position" of the scroll bar is at the top. Press the ENTER key and the position goes back to the bottom. Always reproducible using Fedora 17 beta. gnome-terminal-3.4.1.1-1.fc17
Confirmed with vte 0.34.8. I'll try to take a look.
Quick workaround: remove the "if" guard (but keep the inner three lines) of vte_terminal_queue_adjustment_value_changed(). When switching screens, the screen's scroll_delta doesn't change, hence updating the scrollbar is skipped. But the scrollbar is per-terminal and not per-screen. I'm yet to figure out the nice solution...
Created attachment 256046 [details] [review] Fix Not the nicest way to fix it, but probably will do.
Committed to vte-0-34. Thanks.