GNOME Bugzilla – Bug 415277
Garbage displayed after resizing whilst using an alternate screen
Last modified: 2014-04-06 18:17:29 UTC
Please describe the problem: The Screen is not cleared correctly after changing a windows size. This bug is really unnerving when using gnome-terminal with a specific pattern. Steps to reproduce: 1. 2. 3. Steps to reproduce: - Open new terminal - ls -l /usr/bin - Maximize Terminal Window with window manager's maximize facility - ls -l /usr/bin | less - De-Maximize Window - Exit less (by using the "q" command) I use Terminal with this pattern _a lot_ , and so this really annoys the heck out of me.. :-/ I would be greatful for a quick fix. Actual results: This reproducibly leads to junk being displayed on the line next to the command prompt! Expected results: Screen being cleared normally, no annoying junk right of the command prompt. Does this happen every time? Yes Other information: How can it be this bug has not been filed yet? It's really unnerving and has been existing for several years!
*** Bug 415278 has been marked as a duplicate of this bug. ***
I was aware of similar garbage being displayed after resizing whilst using an alternate screen and thought I had succeeded in implementing a workaround. However, it still fails for your testcase. :-( Unfortunately due to the timing we have missed the cut-off for gnome-2.18, so I might as well take the time to work out just why resizing+alternates goes so wrong. Thankyou for your report.
Whatever strategy is being used for resizing the normal screen (including traking the cursor), it should resize the normal screen the same way even if the alternate one is visible. Bug 336238 depends on this. Current work-in-progress patches in that bug already fix this, but probably it'd be nicer to split the work in two: fix this issue first, then build the other one on top of it.
Egmont. Have separate patch for this?
I can split the rewrapping patch in two. Probably it'd make reviewing/debugging easier. Basically it's the bits that figuring out the insert/scroll deltas, cursor position etc. work on "normal_screen" rather than "screen". Probably it should do the work on both...???
Whatever you think is best. I'm just trying to make some progress before you move on ;). I'm working on the stream right now.
Created attachment 256010 [details] [review] fix Fix added, please test. Most of the code is just moving stuff to a new method. The new functionality is that the normal screen is also resized even when the alternate one is visible. scroll_delta has to be set differently depending on whether the screen we're resizing is the active one: vte_terminal_queue_adjustment_value_changed() versus simply just setting. Adjusting the saved cursor's position is new too (backported from the rewrapping patch), it is required for when you maximize/unmaximize opposite than in the original bugreport.
(Patch goes on top of git vte-0-34)
Committed. Thanks!