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 413068 - new line added to tab when opened
new line added to tab when opened
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
0.15.x
Other Linux
: Normal normal
: ---
Assigned To: Chris Wilson
VTE Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-02-28 14:13 UTC by Sebastien Bacher
Modified: 2007-03-02 15:07 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
Patch wrt to 0.15.6 (2.00 KB, patch)
2007-03-02 13:00 UTC, Chris Wilson
none Details | Review

Description Sebastien Bacher 2007-02-28 14:13:43 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
Comment 1 Chris Wilson 2007-02-28 14:21:19 UTC
The crowd roars "SCREEENSHOT!"

Sorry, it's another one those "works for me" - can you check HEAD?
Comment 2 Sebastien Bacher 2007-02-28 18:56:58 UTC
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
Comment 3 Mariano Suárez-Alvarez 2007-02-28 20:14:11 UTC
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.
Comment 4 Alan Siu-Lung Tam 2007-02-28 21:17:01 UTC
I can reproduce this with "gnome-terminal --geometry=AxB" where B < 24 or B > 54.
Comment 5 Chris Wilson 2007-02-28 23:28:52 UTC
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.
Comment 6 Chris Wilson 2007-02-28 23:56:18 UTC
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.

Comment 7 Sebastien Bacher 2007-03-01 00:39:09 UTC
that change applied to the current Ubuntu package doesn't fix the bug, I will try trunk tomorrow
Comment 8 Sebastien Bacher 2007-03-01 22:02:37 UTC
The new 0.15.6 tarball still has that problem
Comment 9 Chris Wilson 2007-03-02 09:55:16 UTC
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.
Comment 10 Chris Wilson 2007-03-02 12:59:07 UTC
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.

Comment 11 Chris Wilson 2007-03-02 13:00:55 UTC
Created attachment 83725 [details] [review]
Patch wrt to 0.15.6

For convenience as I iterated through one false attempt.
Comment 12 Sebastien Bacher 2007-03-02 15:07:25 UTC
That patch fixes it