GNOME Bugzilla – Bug 104841
scrolling doesn't work inside "screen" windows
Last modified: 2006-03-13 05:46:32 UTC
Description of Problem: I'm using gnome-terminal 2.1.4 built with garnome 0.20. If I start GNU screen, sometimes scrolling within one of screen's subwindows scrolls too much and messes up the whole display. The problem seems to occur when a line wraps while scrolling a subwindow. Steps to reproduce the problem: 1. start gnome-terminal 2. run GNU screen within terminal 3. press return until prompt is at bottom 4. cat a file with lines longer than width of window Actual Results: Entire contents of terminal window scroll, including screen status bar. Expected Results: Only GNU screen subwindow should scroll, status bar should remain How often does this happen? Every time
Not sure what you mean by the screen statusbar. Could you explain in more detail please? If I run screen in gnome-terminal the only thing that changes is the window title and if run in a tab the tab title.
With gnome-terminal 2.8.0, this bug is a little different. I was not able to reproduce by switching tabs, but turning on and off the menu bar still causes problems. To be specific: 1. add something like hardstatus alwayslastline "%n (%t) %= (%l) %D %M %d %C %a" to .screenrc, which puts a statusbar at the bottom of the screen. This is a line with the current time, etc. which does not scroll and should always be fixed at the bottom line of the terminal (only the rest of the terminal scrolls). 2. start gnome-terminal and turn off menu bar 3. run GNU screen and press return until the prompt is at the bottom of the screen. 4. turn on menu bar and then turn it back off 5. cat a file with lines longer than width of window The screen status bar should not scroll but it does.
Err, isn't this screen's fault? Is there actually *anything* gnome-terminal can do to workaround? I really doubt it.
In fact it is vte's fault. screen handles resizes correctly afterall. And when no resize is done, it cannot be screen's fault. Attaching patch...
Created attachment 60962 [details] [review] fix patch The patch make vte not try to readjust many things on geometry change if the row_count and column_count have not changed. This includes the restricted region for the scroll, and seems to fix the screen problem.
Can use some testing.
*** Bug 127979 has been marked as a duplicate of this bug. ***
Patch is working perfectly. Also fixes the dreaded irssi+screen+gnome-terminal problem which everyone seems to have. Should definitely be included for 2.14.1.
Created attachment 61145 [details] [review] Better patch. Ok, while the previous patch used to hide the problem, this one actually fixes it too. The problem was that the start/end of restricted_region was not readjusted correctly (they were adjusted to the wrong dimension). My first patch made sure that no readjustment is done if the row&column count of terminal have not changed. This patch does that, plus actually fixing the readjustment such that without the first part it works correct too. Seems like when the terminal size does change, it's not a big deal to misadjust those values, as all apps will reset them anyway themselves.
Committed. Should be in vte-0.12.1 and GNOME 2.14.1. 2006-03-08 Behdad Esfahbod <behdad@gnome.org> Bug 104841 – scrolling doesn't work inside "screen" windows * src/vte.c (vte_terminal_size_allocate): Fix restricted scrolling region readjustment. Moreover, do not do unnecessary updates when number of rows & columns has not changed.