GNOME Bugzilla – Bug 413068
new line added to tab when opened
Last modified: 2007-03-02 15:07:25 UTC
With vte 0.15.5: * maximize gnome-terminal * open a new tab * note that there is a new line in the middle of the prompt Doing the same thing with vte 0.15.3 works fine
The crowd roars "SCREEENSHOT!" Sorry, it's another one those "works for me" - can you check HEAD?
text mode screenshot :p "g nome@desktop" that's what the new tab looks like with an user GNOME, with 0.15.3, it looks like that: "gnome@desktop" That happens only when the window is maximized and opening the tab with the menu item or keyboard makes no difference. I'm running 0.15.5 with the crash fix from today, will try SVN trunk and let you know
I can reproduce this with PROMPT_COMMAND set to "" or to "history -a" as Sebatien himself had. Also, this only happens when the number of terminals in a window goes from 1 to 2—from n to n+1 with n>1 things are ok. Interestingly, the gnome-terminal instance having other terminals in other windows does not affect this.
I can reproduce this with "gnome-terminal --geometry=AxB" where B < 24 or B > 54.
Hmm, I can reproduce this by doctoring vteapp to resize half-way through feeding a line to the terminal. [But have so far failed to produce a simpler testcase :[ Interestingly, even though we do "abc«resize»def\n", it still results in: a bcdef Most odd.
Ok, the resize was a red herring. Having reviewed the debug output I spotted yet another lazy font loading bug and after fixing it the newline disappeared. Is anybody able to reproduce this against HEAD? r1786: 2007-02-28 Chris Wilson <chris@chris-wilson.co.uk> Bug 413068 – new line added to tab when opened * src/vte.c (vte_terminal_ensure_font), (vte_terminal_realize): Beware when no font is set before the first request... Make sure that at least the default font is set.
that change applied to the current Ubuntu package doesn't fix the bug, I will try trunk tomorrow
The new 0.15.6 tarball still has that problem
Thanks Sebastien for checking. Can I ask you compile with --enable-debugging and attach the output of VTE_DEBUG_FLAGS=all? Feels like pulling out a shotgun to shoot a fly, but maybe it'll tell us something.
After reviewing Sebastien's debug log which clearly shows that for some [atm] unfathomable reason it inserts a couple of lines between the first character and the second to handle the scroll_event caused by the window resize. [Or rather I suspect the reason is so fugly that I daren't even mention it ;-] The issue is that resize event (caused by the maximised window being reduced to accomodate the tabs) should not be generating a scroll event. Okay this should handle the down-sizing correctly now. As usual, please check :-) r1799: 2007-03-02 Chris Wilson <chris@chris-wilson.co.uk> Bug 413068 – new line added to tab when opened * src/vte.c (vte_terminal_size_allocate): Replace the ill-conceived attempt (delta could not be negative, so insert_delta or scroll_delta would not become negative either) by only considering changes wrt to the number of visible lines.
Created attachment 83725 [details] [review] Patch wrt to 0.15.6 For convenience as I iterated through one false attempt.
That patch fixes it