After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 104841 - scrolling doesn't work inside "screen" windows
scrolling doesn't work inside "screen" windows
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
0.11.x
Other Linux
: High normal
: ---
Assigned To: Behdad Esfahbod
GNOME Terminal Maintainers
: 127979 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-01-30 18:44 UTC by Roland Dreier
Modified: 2006-03-13 05:46 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
fix patch (2.99 KB, patch)
2006-03-09 11:48 UTC, Behdad Esfahbod
accepted-commit_after_freeze Details | Review
Better patch. (2.75 KB, patch)
2006-03-13 03:36 UTC, Behdad Esfahbod
committed Details | Review

Description Roland Dreier 2003-01-30 18:44:13 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
Comment 1 Kjartan Maraas 2005-01-06 11:53:18 UTC
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.
Comment 2 Roland Dreier 2005-01-07 17:50:50 UTC
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.
Comment 3 Guilherme de Siqueira Pastore 2006-01-10 03:08:40 UTC
Err, isn't this screen's fault? Is there actually *anything* gnome-terminal can do to workaround? I really doubt it.
Comment 4 Behdad Esfahbod 2006-03-09 11:46:06 UTC
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...
Comment 5 Behdad Esfahbod 2006-03-09 11:48:32 UTC
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.
Comment 6 Behdad Esfahbod 2006-03-09 11:49:22 UTC
Can use some testing.
Comment 7 Allison Karlitskaya (desrt) 2006-03-12 16:42:03 UTC
*** Bug 127979 has been marked as a duplicate of this bug. ***
Comment 8 Allison Karlitskaya (desrt) 2006-03-12 16:44:40 UTC
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.
Comment 9 Behdad Esfahbod 2006-03-13 03:36:54 UTC
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.
Comment 10 Behdad Esfahbod 2006-03-13 05:46:19 UTC
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.